底部间隔修改实现
This commit is contained in:
parent
1caa595e00
commit
4f9c671e86
@ -278,7 +278,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private GifImageView mGifImageView;
|
||||
public static SVGAImageView mSVGAImageView;
|
||||
private ViewGroup mLiveGiftPrizePoolContainer;
|
||||
|
||||
private LinearLayout live_bottom_layout;
|
||||
private View mBtnPrizePool;//奖池按钮
|
||||
private TextView mPrizePoolLevel;//奖池等级
|
||||
private int forAct;
|
||||
@ -1000,15 +1000,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
});
|
||||
sudNameHandler.removeCallbacks(sudNameRunnable);
|
||||
sudNameHandler.postDelayed(sudNameRunnable, 10000);
|
||||
sud_layout_name.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//TODO 这里报了类型错误 android.widget.LinearLayout$LayoutParams cannot be cast to android.widget.RelativeLayout$LayoutParams
|
||||
ViewGroup.LayoutParams params1 = sud_layout_name.getLayoutParams();
|
||||
params1.width = mChatRecyclerView.getWidth() - DpUtil.dp2px(85);
|
||||
sud_layout_name.setLayoutParams(params1);
|
||||
}
|
||||
});
|
||||
// sud_layout_name.post(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// //TODO 这里报了类型错误 android.widget.LinearLayout$LayoutParams cannot be cast to android.widget.RelativeLayout$LayoutParams
|
||||
//// ViewGroup.LayoutParams params1 = sud_layout_name.getLayoutParams();
|
||||
//// params1.width = mChatRecyclerView.getWidth() - DpUtil.dp2px(85);
|
||||
//// sud_layout_name.setLayoutParams(params1);
|
||||
// }
|
||||
// });
|
||||
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
@ -5637,15 +5637,20 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
fastMsgRecyclerView.setVisibility(View.VISIBLE);
|
||||
fastMessageRecyclerViewAdapter.setMessage(greetings);
|
||||
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams) mChatRecyclerView.getLayoutParams();
|
||||
live_bottom_layout = findViewById(R.id.live_bottom_layout);
|
||||
RelativeLayout.LayoutParams params2 = (RelativeLayout.LayoutParams) live_bottom_layout.getLayoutParams();
|
||||
if (greetings.size() > 0) {
|
||||
params1.bottomMargin = 100;
|
||||
params1.bottomMargin = DpUtil.dp2px(38);
|
||||
params2.bottomMargin = DpUtil.dp2px(38);
|
||||
} else if(isAnchorLive()){
|
||||
params1.bottomMargin = 0;
|
||||
params2.bottomMargin = 0;
|
||||
}else {
|
||||
params1.bottomMargin = DpUtil.dp2px(10);
|
||||
params2.bottomMargin = DpUtil.dp2px(10);
|
||||
}
|
||||
|
||||
mChatRecyclerView.setLayoutParams(params1);
|
||||
live_bottom_layout.setLayoutParams(params2);
|
||||
}
|
||||
|
||||
public void setManager(FaceManager manager) {
|
||||
|
@ -2537,7 +2537,6 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginEnd="70dp"
|
||||
tools:visibility="visible"/>
|
||||
</RelativeLayout>
|
||||
|
||||
@ -2559,6 +2558,7 @@
|
||||
android:layout_below="@id/live_video" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/live_bottom_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
|
Loading…
Reference in New Issue
Block a user