diff --git a/config.gradle b/config.gradle index 3f66756b1..492fa93ba 100644 --- a/config.gradle +++ b/config.gradle @@ -9,9 +9,9 @@ ext { ] manifestPlaceholders = [ //正式 -// serverHost : "https://napi.yaoulive.com", + serverHost : "https://napi.yaoulive.com", //測試 - serverHost : "https://ceshi.yaoulive.com", +// serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", diff --git a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java index f3a9bee2c..47a5243d2 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java @@ -10,6 +10,7 @@ import android.graphics.Color; import android.os.Bundle; import android.os.CountDownTimer; import android.os.Handler; +import android.text.TextUtils; import android.util.DisplayMetrics; import android.util.Log; import android.view.LayoutInflater; @@ -32,6 +33,7 @@ import com.opensource.svgaplayer.SVGAVideoEntity; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; import com.yunbao.common.bean.MsgModel; +import com.yunbao.common.event.LiveAudienceEvent; import com.yunbao.common.event.MessageIMEvent; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.HttpCallback; @@ -48,13 +50,14 @@ import com.yunbao.live.bean.LiveChatBean; import com.yunbao.live.dialog.LiveHDDialogFragment; import com.yunbao.live.dialog.LiveMicUserDialogFragment; import com.yunbao.live.dialog.LivePromotionDialogFragment; -import com.yunbao.common.event.LiveAudienceEvent; import com.yunbao.live.http.LiveHttpUtil; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; +import java.util.Locale; + /** * Created by cxf on 2018/10/9. * 观众直播间逻辑 @@ -74,7 +77,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { private TextView goToRomm; private int icon = 0; private String nobleName, nobleTtext; - private ImageView giftImage; + private ImageView giftImage,liveNewPeople; public LiveAudienceViewHolder(Context context, ViewGroup parentView) { super(context, parentView); @@ -181,6 +184,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { findViewById(R.id.btn_gift).setOnClickListener(this); findViewById(R.id.btn_zg).setOnClickListener(this); giftImage = (ImageView) findViewById(R.id.gift_image); + liveNewPeople = (ImageView) findViewById(R.id.live_new_people); svga_new_user_gif = (SVGAImageView) findViewById(R.id.svga_new_user_gif); svga_new_user_double = (SVGAImageView) findViewById(R.id.svga_new_user_double); svga_new_user_follow = (SVGAImageView) findViewById(R.id.svga_new_user_follow); @@ -314,6 +318,10 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { .setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP)); } }); + Locale locale = mContext.getResources().getConfiguration().locale; + String language = locale.getLanguage(); + + ImgLoader.display(mContext,TextUtils.equals(language, "zh")?R.mipmap.live_icon_new_people_cn:R.mipmap.live_icon_newpeople_en,liveNewPeople); } public static Handler handler = new Handler(); diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 8fa24be5d..2b2cfaffc 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -42,6 +42,7 @@ import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; import com.yunbao.common.bean.LevelBean; import com.yunbao.common.bean.UserBean; +import com.yunbao.common.event.LiveAudienceEvent; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.CommonHttpConsts; import com.yunbao.common.http.CommonHttpUtil; @@ -79,7 +80,6 @@ import com.yunbao.live.custom.TopGradual; import com.yunbao.live.dialog.LiveFansMedalDialogFragment; import com.yunbao.live.dialog.LiveHDDialogFragment; import com.yunbao.live.dialog.LiveUserDialogFragment; -import com.yunbao.common.event.LiveAudienceEvent; import com.yunbao.live.http.LiveHttpConsts; import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.presenter.LiveDanmuPresenter; @@ -847,6 +847,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } } }); + //点击打开周星榜 + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_wks_layout), + () -> Bus.get().post(new LiveAudienceEvent() + .setType(LiveAudienceEvent.LiveAudienceType.LIVE_WKS))); } public static int pkEndIndex = 0; diff --git a/live/src/main/res/layout/view_live_audience.xml b/live/src/main/res/layout/view_live_audience.xml index e7cb1f369..e5b5d6ed7 100644 --- a/live/src/main/res/layout/view_live_audience.xml +++ b/live/src/main/res/layout/view_live_audience.xml @@ -460,7 +460,7 @@ android:layout_marginEnd="16dp" android:layout_toStartOf="@id/gift_image" android:padding="4dp" - android:src="@mipmap/live_icon_new_people_cn" /> + android:src="@mipmap/live_icon_newpeople_en" /> diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 9c6ddd9b4..273280ae4 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -189,7 +189,7 @@ android:src="@mipmap/icon_arrow_right" android:visibility="gone" /> - + + android:paddingRight="5dp" + android:visibility="gone"> + + + + + + + + + + android:paddingStart="8dp" + android:paddingEnd="5dp" + android:visibility="gone">