fix:修复Android9下观众列表不显示问题

fix:修复守护权益列表数组下标异常问题
update:根据需求调整购买守护
update:快捷语右移一点
This commit is contained in:
zlzw 2022-08-31 13:51:30 +08:00
parent 1e78929691
commit 8bd3a32c5e
6 changed files with 38 additions and 46 deletions

View File

@ -239,10 +239,12 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
bean.setChecked(false);
}
for (int i : guardBuyBean.getPrivilege()) {
mRightList.get(i).setChecked(true);
if(i<mRightList.size()) {
mRightList.get(i).setChecked(true);
}
}
mGuardRightAdapter.notifyDataSetChanged();
mBtnBuy.setEnabled(mCoinVal >= guardBuyBean.getCoin());
// mBtnBuy.setEnabled(mCoinVal >= guardBuyBean.getCoin());
}
}

View File

@ -783,11 +783,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
if (mLiveUserAdapter != null) {
JSONObject obj = JSON.parseObject(info[0]);
List<LiveUserGiftBean> list = JSON.parseArray(obj.getString("userlist"), LiveUserGiftBean.class);
if(list.size()>3){
ViewGroup.LayoutParams layoutParams = mUserRecyclerView.getLayoutParams();
layoutParams.height=DpUtil.dp2px(100);
mUserRecyclerView.setLayoutParams(layoutParams);
}
mLiveUserAdapter.refreshList(list);
}
}
@ -1464,7 +1459,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
*/
public void setUserList(List<LiveUserGiftBean> list) {
if (mLiveUserAdapter != null) {
resetUserListWidth(DpUtil.dp2px((Math.min(list.size(), 3)) * 38));
//resetUserListWidth(DpUtil.dp2px((Math.min(list.size(), 3)) * 30));
mLiveUserAdapter.refreshList(list);
}
}

View File

@ -1,15 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true">
<shape>
<corners android:radius="15dp"/>
<gradient android:endColor="#FF7D2F" android:startColor="#FF5623" android:type="linear"/>
</shape>
</item>
<item android:state_enabled="false">
<shape>
<corners android:radius="15dp"/>
<solid android:color="@color/gray3"/>
<item android:width="102dp" android:height="34dp">
<shape android:shape="rectangle">
<gradient android:type="linear" android:useLevel="true" android:startColor="#ffa98cfd" android:endColor="#ff9d7afd" android:angle="90" />
<corners android:radius="21dp" />
</shape>
</item>
</selector>

View File

@ -132,7 +132,7 @@
android:layout_marginTop="25dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:visibility="gone">
tools:visibility="visible">
<TextView
@ -164,7 +164,6 @@
android:layout_centerVertical="true"
android:layout_marginEnd="15dp"
android:background="@drawable/bg_guard_btn_buy"
android:enabled="false"
android:gravity="center"
android:text="@string/guard_buy"
android:textColor="@color/white"

View File

@ -1,19 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="38dp"
android:layout_height="wrap_content"
>
android:layout_height="38dp">
<!-- <ImageView-->
<!-- android:id="@+id/wrap"-->
<!-- android:layout_width="32dp"-->
<!-- android:layout_height="44dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:scaleType="fitXY"-->
<!-- android:layout_marginBottom="1dp"-->
<!-- android:src="@mipmap/icon_live_user_list_1"/>-->
<!-- <ImageView-->
<!-- android:id="@+id/wrap"-->
<!-- android:layout_width="32dp"-->
<!-- android:layout_height="44dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:scaleType="fitXY"-->
<!-- android:layout_marginBottom="1dp"-->
<!-- android:src="@mipmap/icon_live_user_list_1"/>-->
<RelativeLayout
android:layout_width="38dp"
@ -25,19 +23,19 @@
android:id="@+id/avatar"
android:layout_width="27dp"
android:layout_height="27dp"
android:layout_centerVertical="true"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:scaleType="centerCrop"
app:riv_oval="true"
android:src="@drawable/m_chu_xia"/>
android:src="@drawable/m_chu_xia"
app:riv_oval="true" />
<com.opensource.svgaplayer.SVGAImageView
android:id="@+id/gift_svga"
android:layout_width="38dp"
android:layout_height="38dp"
app:autoPlay="true"/>
app:autoPlay="true" />
</RelativeLayout>
@ -46,15 +44,15 @@
android:id="@+id/icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:visibility="gone"/>
android:layout_alignParentBottom="true"
android:visibility="gone" />
<ImageView
android:id="@+id/guard_icon"
android:layout_width="17dp"
android:layout_height="17dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:visibility="gone"/>
android:layout_alignParentBottom="true"
android:visibility="gone" />
</RelativeLayout>

View File

@ -181,8 +181,9 @@
android:layout_toRightOf="@id/group_1">
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end|center"
android:layout_alignParentRight="true"
android:orientation="horizontal">
@ -215,7 +216,8 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/user_recyclerView"
android:layout_width="wrap_content"
android:layout_width="80dp"
android:layout_gravity="end|center"
android:layout_height="40dp"
android:layout_marginRight="-3dp"
android:overScrollMode="never" />
@ -223,16 +225,17 @@
<ImageView
android:id="@+id/user_more"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginTop="4dp"
android:layout_gravity="center"
android:layout_height="40dp"
android:src="@mipmap/live_users_more" />
<ImageView
android:id="@+id/btn_close"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginStart="6dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="4dp"
android:scaleType="fitCenter"
android:src="@mipmap/icon_live_close_3" />
</LinearLayout>
@ -1861,6 +1864,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/room_fast_msg"
android:layout_width="match_parent"
android:layout_marginStart="10dp"
android:layout_height="30dp"
android:layout_alignParentBottom="true"
android:visibility="gone" />