diff --git a/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java index 2a65e8304..0ee74e462 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java @@ -337,6 +337,12 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl @Override public void onSuccess(List data) { if (data != null) { + if(data.size() == 0){ + findViewById(R.id.tips).setVisibility(View.GONE); + return; + } + Log.i("LiveOpenTipsBean",data.toString()); + findViewById(R.id.tips).setVisibility(View.VISIBLE); for (int i = 0; i < data.size(); i++) { LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(16), DpUtil.dp2px(16)); LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); 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 dd82f9f85..793815d89 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -983,6 +983,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis sud_layout_name.post(new Runnable() { @Override public void run() { + //TODO 这里报了类型错误 RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams) sud_layout_name.getLayoutParams(); params1.width = mChatRecyclerView.getWidth() - DpUtil.dp2px(85); sud_layout_name.setLayoutParams(params1); @@ -3016,7 +3017,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mRedVal.setVisibility(View.GONE); mBlueVal.setVisibility(View.GONE); mPkRankTopIcon.setVisibility(View.GONE); - mAnchorLayout.setBackgroundResource(R.drawable.bg_live_ico); + // mAnchorLayout.setBackgroundResource(R.drawable.bg_live_ico); mGoodNumberIcon.setVisibility(View.GONE); mAnchorSay.setVisibility(View.INVISIBLE); showAnchorSayAndCallAnchor(); @@ -3527,29 +3528,29 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (flipper.getChildCount() > 0) { flipper.removeAllViews(); } - LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(16), DpUtil.dp2px(16)); - LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); - textParams.leftMargin = DpUtil.dp2px(5); - params.leftMargin = DpUtil.dp2px(5); +// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(16), DpUtil.dp2px(16)); +// LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); +// textParams.leftMargin = DpUtil.dp2px(5); +// params.leftMargin = DpUtil.dp2px(5); API.get().pdLiveApi(mContext).getHourChartRank(mLiveUid).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(listResponseModel -> { List info = listResponseModel.getData().getInfo(); if (!info.isEmpty()) { - View hotView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null); - View hourView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null); + View hotView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list2, null); + View hourView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list2, null); ImageView hotPic = hotView.findViewById(R.id.wish_pic); ImageView hourPic = hourView.findViewById(R.id.wish_pic); mHotText = hotView.findViewById(R.id.wish_index); mHourRank = hourView.findViewById(R.id.wish_index); mHotText.setText("0"); - mHotText.setLayoutParams(textParams); - mHourRank.setLayoutParams(textParams); +// mHotText.setLayoutParams(textParams); +// mHourRank.setLayoutParams(textParams); mHotText.setGravity(Gravity.CENTER); mHourRank.setGravity(Gravity.CENTER); setHourRankData(info.get(0).getRank()); hotPic.setImageResource(R.mipmap.ic_live_hour_rank); - hourPic.setImageResource(R.drawable.icon_heat_new); - hotPic.setLayoutParams(params); - hourPic.setLayoutParams(params); + hourPic.setImageResource(R.mipmap.ic_live_hot_rank); +// hotPic.setLayoutParams(params); +// hourPic.setLayoutParams(params); flipper.addView(hotView); flipper.addView(hourView); flipper.startFlipping(); diff --git a/live/src/main/res/layout/view_live_play_sw.xml b/live/src/main/res/layout/view_live_play_sw.xml index 238d683df..578425160 100644 --- a/live/src/main/res/layout/view_live_play_sw.xml +++ b/live/src/main/res/layout/view_live_play_sw.xml @@ -14,7 +14,8 @@ android:layout_height="match_parent" android:visibility="gone" app:surface_type="texture_view" - app:use_controller="false" /> + app:use_controller="false" + tools:visibility="visible"/> + android:layout_marginTop="@dimen/live_top"> + + + android:visibility="gone" + tools:visibility="gone"> + android:background="@drawable/bg_live_item_an" /> + diff --git a/live/src/main/res/values/dimen.xml b/live/src/main/res/values/dimen.xml index dc168c0bf..a276ae04a 100644 --- a/live/src/main/res/values/dimen.xml +++ b/live/src/main/res/values/dimen.xml @@ -1,5 +1,5 @@ 250dp - 165dp + 148dp \ No newline at end of file