feat:优化房间布局(动态状态栏高度)
This commit is contained in:
@@ -6,6 +6,7 @@ import android.view.View
|
||||
import androidx.core.view.isInvisible
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
import com.nnbc123.app.R
|
||||
import com.nnbc123.app.avroom.adapter.GameMicroViewAdapter
|
||||
import com.nnbc123.app.avroom.adapter.GameMiniMicroViewAdapter
|
||||
@@ -58,6 +59,7 @@ class GameRoomFragment : BaseRoomFragment<IGameRoomView?, GameRoomPresenter?>(),
|
||||
override fun onFindViews() {
|
||||
super.onFindViews()
|
||||
gameBinding = DataBindingUtil.bind(mView)!!
|
||||
ImmersionBar.with(this).titleBarMarginTop(gameBinding.spaceTitleBar).init()
|
||||
gameBinding.lifecycleOwner = this
|
||||
gameBinding.click = this
|
||||
gameBinding.ktvModel = false
|
||||
|
@@ -13,6 +13,7 @@ import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import cn.sharesdk.framework.Platform
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
import com.netease.nim.uikit.common.util.string.StringUtil
|
||||
import com.netease.nimlib.sdk.chatroom.ChatRoomMessageBuilder
|
||||
import com.netease.nimlib.sdk.chatroom.model.ChatRoomMessage
|
||||
@@ -123,6 +124,7 @@ class HomePartyFragment : BaseFragment(), View.OnClickListener, OnShareDialogIte
|
||||
|
||||
override fun onFindViews() {
|
||||
_binding = DataBindingUtil.bind(mView)
|
||||
ImmersionBar.with(this).titleBarMarginTop(binding.layoutTitleBar).init()
|
||||
setupRoomTitleMarquee()
|
||||
}
|
||||
|
||||
|
@@ -8,6 +8,7 @@ import android.widget.ImageView;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
import com.nnbc123.app.R;
|
||||
import com.nnbc123.app.avroom.activity.AVRoomActivity;
|
||||
@@ -133,6 +134,7 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
public void onFindViews() {
|
||||
super.onFindViews();
|
||||
gameBinding = DataBindingUtil.bind(mView);
|
||||
ImmersionBar.with(this).titleBarMarginTop(gameBinding.layoutRoot).init();
|
||||
gameBinding.setLifecycleOwner(this);
|
||||
gameBinding.setClick(this);
|
||||
gameBinding.setKtvModel(false);
|
||||
|
@@ -9,6 +9,7 @@ import androidx.core.view.isVisible
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.viewModels
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.nnbc123.app.R
|
||||
import com.nnbc123.app.avroom.adapter.OnMicroItemClickListener
|
||||
@@ -86,6 +87,7 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
override fun onFindViews() {
|
||||
super.onFindViews()
|
||||
gameBinding = DataBindingUtil.bind(mView)!!
|
||||
ImmersionBar.with(this).titleBarMarginTop(gameBinding.spaceTitleBar).init()
|
||||
gameBinding.lifecycleOwner = this
|
||||
gameBinding.click = this
|
||||
}
|
||||
@@ -265,13 +267,13 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
gameBinding.microView.bindAdapter(SingleRoomPKMicroViewAdapter(context))
|
||||
gameBinding.viewPkBoard.isVisible = true
|
||||
gameBinding.microView.updateLayoutParams<ConstraintLayout.LayoutParams> {
|
||||
topMargin = ScreenUtil.dip2px(140f)
|
||||
topMargin = ScreenUtil.dip2px(50f)
|
||||
}
|
||||
} else if (!AvRoomDataManager.get().isOpenAnotherPKMode && gameBinding.microView.adapter !is SingleAnchorMicroViewAdapter) {
|
||||
gameBinding.microView.bindAdapter(SingleAnchorMicroViewAdapter(context))
|
||||
gameBinding.viewPkBoard.isVisible = false
|
||||
gameBinding.microView.updateLayoutParams<ConstraintLayout.LayoutParams> {
|
||||
topMargin = ScreenUtil.dip2px(110f)
|
||||
topMargin = ScreenUtil.dip2px(10f)
|
||||
}
|
||||
} else {
|
||||
gameBinding.microView.adapter?.notifyDataSetChanged()
|
||||
|
@@ -321,9 +321,9 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
//游戏安全操作区域
|
||||
val viewGameRect = JSONObject()
|
||||
viewGameRect.put("left", 0)
|
||||
viewGameRect.put("top", ScreenUtil.dip2px(200f))
|
||||
viewGameRect.put("top", ScreenUtil.dip2px(180f))
|
||||
viewGameRect.put("right", 0)
|
||||
viewGameRect.put("bottom", ScreenUtil.dip2px(200f))
|
||||
viewGameRect.put("bottom", ScreenUtil.dip2px(150f))
|
||||
jsonObject.put("view_game_rect", viewGameRect)
|
||||
|
||||
//通知游戏
|
||||
|
@@ -35,10 +35,11 @@
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50dp"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="@dimen/dp_5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@@ -23,10 +23,11 @@
|
||||
</data>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="95dp"
|
||||
android:clipChildren="false">
|
||||
android:clipChildren="false"
|
||||
android:paddingTop="@dimen/dp_44">
|
||||
|
||||
<com.nnbc123.app.avroom.widget.MicroView
|
||||
android:id="@+id/micro_view"
|
||||
@@ -39,6 +40,7 @@
|
||||
android:layout_width="57dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shape_white_alpha_10_radius_100"
|
||||
android:drawableStart="@drawable/ic_notice_board"
|
||||
android:gravity="center"
|
||||
@@ -60,29 +62,40 @@
|
||||
android:layout_marginTop="5dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.nnbc123.app.avroom.hour_rank.RoomHourRankWidget
|
||||
android:id="@+id/hourRankWidget"
|
||||
android:layout_below="@id/tv_notice_board"
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_rank"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_notice_board"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="6dp" />
|
||||
android:layout_marginTop="6dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_music_flag"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_alignTop="@id/hourRankWidget"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_toEndOf="@id/hourRankWidget"
|
||||
android:src="@drawable/icon_music_flag"
|
||||
android:visibility="gone" />
|
||||
<com.nnbc123.app.avroom.hour_rank.RoomHourRankWidget
|
||||
android:id="@+id/hourRankWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_music_flag"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:src="@drawable/icon_music_flag"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_room_pk_order"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_below="@id/hourRankWidget"
|
||||
android:layout_below="@id/layout_rank"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/bg_room_pk_order"
|
||||
android:gravity="center"
|
||||
@@ -110,7 +123,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_dating_step"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -373,7 +385,7 @@
|
||||
android:id="@+id/vs_music_player"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/hourRankWidget"
|
||||
android:layout_below="@id/layout_rank"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout="@layout/avroom_music_player_layout" />
|
||||
|
||||
|
@@ -30,11 +30,16 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<Space
|
||||
android:id="@+id/space_title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_44" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_below="@id/space_title_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="85dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@@ -74,7 +79,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.nnbc123.app.avroom.widget.BottomView
|
||||
android:id="@+id/bottom_view"
|
||||
android:layout_width="match_parent"
|
||||
@@ -92,7 +96,6 @@
|
||||
android:layout_marginEnd="90dp"
|
||||
android:layout_marginBottom="@dimen/dp_10" />
|
||||
|
||||
|
||||
<com.nnbc123.app.ui.widget.rollviewpager.RollPagerView
|
||||
android:id="@+id/activity_img"
|
||||
android:layout_width="45dp"
|
||||
|
@@ -16,14 +16,20 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<Space
|
||||
android:id="@+id/space_title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.nnbc123.app.avroom.widget.MicroView
|
||||
android:id="@+id/micro_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="110dp"
|
||||
android:layout_marginTop="15dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/space_title_bar"
|
||||
tools:background="@color/color_red" />
|
||||
|
||||
<com.nnbc123.app.avroom.singleroompk.SingleRoomPKBoardView
|
||||
@@ -45,10 +51,9 @@
|
||||
android:id="@+id/pager_view_wish_list"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="90dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@id/space_title_bar" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_fans_team"
|
||||
@@ -83,10 +88,10 @@
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/bg_room_pk_match_order"
|
||||
android:gravity="center"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/fl_fans_team"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/fl_fans_team">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -111,12 +116,12 @@
|
||||
|
||||
<com.nnbc123.app.avroom.hour_rank.RoomHourRankWidget
|
||||
android:id="@+id/hourRankWidget"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="92dp" />
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/space_title_bar"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_music_flag"
|
||||
@@ -266,12 +271,12 @@
|
||||
android:id="@+id/vs_music_player"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="125dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout="@layout/avroom_music_player_layout"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@id/hourRankWidget" />
|
||||
|
||||
<com.nnbc123.app.vip.VipBroadcastView
|
||||
android:id="@+id/vip_broadcast_view"
|
||||
|
Reference in New Issue
Block a user