修改活动UI重叠问题
This commit is contained in:
parent
ca0dd85b8d
commit
3689a3a29d
@ -277,7 +277,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private List<BannerBean> mBannerList1 = new ArrayList<>();
|
||||
private List<BannerBean> mBannerList2 = new ArrayList<>();
|
||||
private List<BannerBean> mBannerList3 = new ArrayList<>();
|
||||
private LinearLayout btn_event2;
|
||||
private LinearLayout btn_event2, btn_event3;
|
||||
private ImageView imgEvent;
|
||||
private View btnEvent;
|
||||
private View btnEvent3;
|
||||
@ -627,6 +627,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
btnEvent3 = findViewById(R.id.btn_event3);
|
||||
imgEvent = (ImageView) findViewById(R.id.img_event);
|
||||
btn_event2 = (LinearLayout) findViewById(R.id.btn_event2);
|
||||
btn_event3 = (LinearLayout) findViewById(R.id.btn_event3);
|
||||
mBanner1 = (Banner) findViewById(R.id.banner1);
|
||||
time = (TextView) findViewById(R.id.time);
|
||||
mBanner2 = (Banner) findViewById(R.id.banner2);
|
||||
@ -1032,12 +1033,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mBannerList2 = new ArrayList<>();
|
||||
} else {
|
||||
for (BannerBean bean : mBannerList2) {
|
||||
if (bean.isStart()){
|
||||
if (bean.isStart()) {
|
||||
star = true;
|
||||
bean.setModel(data);
|
||||
}
|
||||
}
|
||||
if (!star){
|
||||
if (!star) {
|
||||
BannerBean bannerBean = new BannerBean();
|
||||
bannerBean.setStart(true);
|
||||
bannerBean.setModel(data);
|
||||
@ -1057,6 +1058,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
return;
|
||||
}
|
||||
btn_event2.setVisibility(View.VISIBLE);
|
||||
if (btn_event3.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) btn_event3.getLayoutParams();
|
||||
layoutParams.bottomMargin = DpUtil.dp2px(150);
|
||||
btn_event3.setLayoutParams(layoutParams);
|
||||
}
|
||||
if (mBannerList2.size() == 1) {
|
||||
mBanner2.setAutoPlay(false)
|
||||
.setPages(mBannerList2, new CustomViewHolder())
|
||||
@ -2880,6 +2886,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
if (mBannerList3 == null || mBannerList3.size() == 0 || mBanner3 == null || bean1 == null) {
|
||||
return;
|
||||
}
|
||||
if (btn_event2.getVisibility() == View.VISIBLE) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) btn_event3.getLayoutParams();
|
||||
layoutParams.bottomMargin = DpUtil.dp2px(150);
|
||||
btn_event3.setLayoutParams(layoutParams);
|
||||
}
|
||||
mBanner3.setAutoPlay(true)
|
||||
.setPages(mBannerList3, new Banner3CustomViewHolder())
|
||||
.setDelayTime(3000)
|
||||
|
@ -42,30 +42,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_event3"
|
||||
android:layout_width="67dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="@mipmap/live_mission_box"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.ms.banner.Banner
|
||||
android:id="@+id/banner3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
app:delay_time="5000"
|
||||
app:indicator_height="8dp"
|
||||
app:indicator_width="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_event1"
|
||||
@ -2121,4 +2097,31 @@
|
||||
app:indicator_width="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_event3"
|
||||
android:layout_width="67dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="@mipmap/live_mission_box"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.ms.banner.Banner
|
||||
android:id="@+id/banner3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
app:delay_time="5000"
|
||||
app:indicator_height="8dp"
|
||||
app:indicator_width="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user