feat : 房间右下角 悬浮按钮 折叠功能
This commit is contained in:
@@ -19,10 +19,12 @@ import android.view.ViewStub
|
||||
import android.widget.EditText
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.RelativeLayout
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.CallSuper
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.LiveData
|
||||
@@ -135,9 +137,11 @@ import com.chwl.core.user.bean.BaseInfo
|
||||
import com.chwl.core.user.bean.UserInfo
|
||||
import com.chwl.core.utils.LogUtils
|
||||
import com.chwl.core.utils.net.VipLevelNotEnoughException
|
||||
import com.chwl.library.common.util.ClickUtils.click
|
||||
import com.chwl.library.common.util.LimitClickUtils
|
||||
import com.chwl.library.common.util.doLog
|
||||
import com.chwl.library.common.util.isVerify
|
||||
import com.chwl.library.common.util.setMargin
|
||||
import com.chwl.library.common.util.setViewWH
|
||||
import com.chwl.library.common.util.setVis
|
||||
import com.chwl.library.net.rxnet.utils.RxNetWorkUtils
|
||||
@@ -186,19 +190,23 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
|
||||
protected lateinit var microView: MicroView
|
||||
protected var mMusicPlayIconView: ImageView? = null
|
||||
|
||||
protected lateinit var btnIvConfigEntrance: ImageView
|
||||
protected lateinit var btnIvgame: ImageView
|
||||
|
||||
protected lateinit var floatBtnLayout: LinearLayout
|
||||
protected lateinit var floatBtnLayoutFold: LinearLayout
|
||||
protected lateinit var btnFold: ImageView
|
||||
protected lateinit var boomLayout: FrameLayout
|
||||
protected lateinit var boomIcon: ImageView
|
||||
protected lateinit var boomProMax: ImageView
|
||||
protected lateinit var boomPro: ImageView
|
||||
protected lateinit var ivTeamPk: ImageView
|
||||
protected lateinit var btnIvConfigEntrance: ImageView
|
||||
protected lateinit var btnIvgame: ImageView
|
||||
protected lateinit var mIvQueuingMicro: ImageView
|
||||
|
||||
|
||||
//---连击时间 需要透明化的view
|
||||
protected var mPlayTogether:View? = null
|
||||
protected var mLayoutDragon:View? = null
|
||||
protected var mIvQueuingMicro:View? = null
|
||||
protected var mivTeamPk:View? = null
|
||||
|
||||
private var musicPlayerView: MusicPlayerView? = null
|
||||
private var mVsMusicPlayer: ViewStub? = null
|
||||
@@ -278,25 +286,16 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
})
|
||||
|
||||
btnIvConfigEntrance = mView.findViewById(R.id.iv_config_entrance)
|
||||
btnIvgame = mView.findViewById(R.id.iv_game)
|
||||
|
||||
boomLayout = mView.findViewById(R.id.boomLayout)
|
||||
boomIcon = mView.findViewById(R.id.boomIcon)
|
||||
boomProMax = mView.findViewById(R.id.boomProMax)
|
||||
boomPro = mView.findViewById(R.id.boomPro)
|
||||
|
||||
boomIcon.post {
|
||||
boomIcon.rotation = -30f
|
||||
initFloatBtnLayout()
|
||||
|
||||
|
||||
bottomView.post {
|
||||
floatBtnLayout.setMargin(bottom = bottomView.height, isDP = false)
|
||||
}
|
||||
|
||||
|
||||
boomLayout.setOnClickListener {
|
||||
showBoomInfoDialog()
|
||||
}
|
||||
|
||||
mivTeamPk = mView.findViewById(R.id.iv_team_pk)
|
||||
mIvQueuingMicro = mView.findViewById(R.id.iv_queuing_micro)
|
||||
mLayoutDragon = mView.findViewById(R.id.layout_dragon)
|
||||
mPlayTogether = mView.findViewById(R.id.play_together)
|
||||
|
||||
@@ -1420,22 +1419,24 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
|
||||
private fun setComboViewVis(vis: Boolean) {
|
||||
floatBtnLayout.alpha = if (vis) 1f else 0f //bottom_view
|
||||
bottomView.alpha = if (vis) 1f else 0f //bottom_view
|
||||
boomLayout.alpha = if (vis) 1f else 0f //boomLayout
|
||||
inputLayout.alpha = if (vis) 1f else 0f //input_layout
|
||||
btnIvConfigEntrance.alpha = if (vis) 1f else 0f //iv_config_entrance
|
||||
btnIvgame.alpha = if (vis) 1f else 0f //iv_game
|
||||
mivTeamPk?.alpha = if (vis) 1f else 0f //iv_team_pk
|
||||
ivTeamPk?.alpha = if (vis) 1f else 0f //iv_team_pk
|
||||
mIvQueuingMicro?.alpha = if (vis) 1f else 0f //iv_queuing_micro
|
||||
mLayoutDragon?.alpha = if (vis) 1f else 0f //layout_dragon
|
||||
mPlayTogether?.alpha = if (vis) 1f else 0f //play_together
|
||||
|
||||
floatBtnLayout.isEnabled = vis //bottom_view
|
||||
bottomView.isEnabled = vis //bottom_view
|
||||
boomLayout.isEnabled = vis //boomLayout
|
||||
inputLayout.isEnabled = vis //input_layout
|
||||
btnIvConfigEntrance.isEnabled = vis //iv_config_entrance
|
||||
btnIvgame.isEnabled = vis //iv_game
|
||||
mivTeamPk?.isEnabled = vis //iv_team_pk
|
||||
ivTeamPk?.isEnabled = vis //iv_team_pk
|
||||
mIvQueuingMicro?.isEnabled = vis //iv_queuing_micro
|
||||
mLayoutDragon?.isEnabled = vis //layout_dragon
|
||||
mPlayTogether?.isEnabled = vis //play_together
|
||||
@@ -1938,5 +1939,65 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe()
|
||||
}
|
||||
|
||||
public fun initFloatBtnLayout(layout: LinearLayout?=null) {
|
||||
|
||||
val parentFragment = parentFragment
|
||||
if (parentFragment != null && parentFragment is HomePartyFragment) {
|
||||
floatBtnLayout = parentFragment.gameMainBinding.floatBtnLayout
|
||||
|
||||
floatBtnLayoutFold = floatBtnLayout.findViewById(R.id.floatBtnLayoutFold)
|
||||
btnFold = floatBtnLayout.findViewById(R.id.btnFold)
|
||||
|
||||
boomLayout = floatBtnLayout.findViewById(R.id.boomLayout)
|
||||
boomIcon = floatBtnLayout.findViewById(R.id.boomIcon)
|
||||
boomProMax = floatBtnLayout.findViewById(R.id.boomProMax)
|
||||
boomPro = floatBtnLayout.findViewById(R.id.boomPro)
|
||||
|
||||
ivTeamPk = floatBtnLayout.findViewById(R.id.iv_team_pk)
|
||||
|
||||
btnIvConfigEntrance = floatBtnLayout.findViewById(R.id.iv_config_entrance)
|
||||
|
||||
btnIvgame = floatBtnLayout.findViewById(R.id.iv_game)
|
||||
|
||||
mIvQueuingMicro = floatBtnLayout.findViewById(R.id.iv_queuing_micro)
|
||||
|
||||
boomIcon.post {
|
||||
boomIcon.rotation = -30f
|
||||
}
|
||||
|
||||
boomLayout.setOnClickListener {
|
||||
showBoomInfoDialog()
|
||||
}
|
||||
|
||||
|
||||
if (AvRoomDataManager.get().isGameRoom) {
|
||||
btnIvgame.setVis(false)
|
||||
mIvQueuingMicro?.setVis(false)
|
||||
}else if (AvRoomDataManager.get().isSingleRoom) {
|
||||
ivTeamPk?.setVis(false)
|
||||
mIvQueuingMicro?.setVis(false)
|
||||
}
|
||||
|
||||
btnFold.setVis((AvRoomDataManager.get().is19Room || AvRoomDataManager.get().is20Room))
|
||||
floatBtnLayoutFold.setViewWH(height = if (btnFold.isVisible) 1 else ViewGroup.LayoutParams.WRAP_CONTENT, isDP = false)
|
||||
btnFold.tag = btnFold.isVisible
|
||||
btnFold.click {
|
||||
val tag = btnFold.tag
|
||||
if (tag is Boolean){
|
||||
if ( tag) {
|
||||
btnFold.tag = false
|
||||
btnFold.setImageResource(R.drawable.ic_eyes_close)
|
||||
floatBtnLayoutFold.setViewWH(height = ViewGroup.LayoutParams.WRAP_CONTENT, isDP = false)
|
||||
} else {
|
||||
btnFold.tag = true
|
||||
btnFold.setImageResource(R.drawable.ic_eyes_open)
|
||||
floatBtnLayoutFold.setViewWH(height = 1, isDP = false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -122,7 +122,7 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
||||
private String[] bgPicture = new String[]{""};
|
||||
|
||||
private UserInfo mUserInfo;
|
||||
private FragmentChatroomGameMainBinding gameMainBinding;
|
||||
public FragmentChatroomGameMainBinding gameMainBinding;
|
||||
|
||||
//收藏房间
|
||||
private String FOLLOW_ROOM_TYPE = "";
|
||||
|
@@ -120,7 +120,6 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
gameBinding.setKtvModel(false);
|
||||
gameBinding.playTogether.setVisibility(View.GONE);
|
||||
microView = mView.findViewById(R.id.micro_view);
|
||||
gameBinding.ivTeamPk.setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -348,14 +347,14 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
private void updatePkScoreBoard() {
|
||||
if (AvRoomDataManager.get().isOpenPKMode()) {
|
||||
|
||||
if (gameBinding.ivTeamPk.getVisibility() == View.GONE) {
|
||||
if (ivTeamPk.getVisibility() == View.GONE) {
|
||||
// 通知更新背景
|
||||
PKStateEvent pkStateEvent = new PKStateEvent();
|
||||
pkStateEvent.setCreate(true);
|
||||
EventBus.getDefault().post(pkStateEvent);
|
||||
showTeamPkDialog();
|
||||
}
|
||||
gameBinding.ivTeamPk.setVisibility(View.VISIBLE);
|
||||
ivTeamPk.setVisibility(View.VISIBLE);
|
||||
//这里通过接口获取PK 详情 更新pk 记分板
|
||||
if (PkModel.get().getCurPkInfo() == null) {
|
||||
PkModel.get().loadPKDataByRoomId(
|
||||
@@ -394,13 +393,15 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
}
|
||||
|
||||
} else {
|
||||
if (gameBinding.ivTeamPk.getVisibility() == View.VISIBLE) {
|
||||
// 通知更新bg
|
||||
PKStateEvent pkStateEvent = new PKStateEvent();
|
||||
pkStateEvent.setCreate(false);
|
||||
EventBus.getDefault().post(pkStateEvent);
|
||||
if (ivTeamPk != null) {
|
||||
if (ivTeamPk.getVisibility() == View.VISIBLE) {
|
||||
// 通知更新bg
|
||||
PKStateEvent pkStateEvent = new PKStateEvent();
|
||||
pkStateEvent.setCreate(false);
|
||||
EventBus.getDefault().post(pkStateEvent);
|
||||
}
|
||||
ivTeamPk.setVisibility(View.GONE);
|
||||
}
|
||||
gameBinding.ivTeamPk.setVisibility(View.GONE);
|
||||
dismissTeamPkDialog();
|
||||
}
|
||||
|
||||
@@ -458,11 +459,11 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
closeDatingMode();
|
||||
}
|
||||
if ((AvRoomDataManager.get().isDatingMode() || AvRoomDataManager.get().isOpenPKMode()) && !AvRoomDataManager.get().isManager()) {
|
||||
gameBinding.ivQueuingMicro.setVisibility(View.VISIBLE);
|
||||
gameBinding.ivQueuingMicro.setImageResource(AvRoomDataManager.get().isDatingMode() ?
|
||||
mIvQueuingMicro.setVisibility(View.VISIBLE);
|
||||
mIvQueuingMicro.setImageResource(AvRoomDataManager.get().isDatingMode() ?
|
||||
R.drawable.ic_dating_queuing_micro : R.drawable.ic_pk_queuing_micro);
|
||||
} else {
|
||||
gameBinding.ivQueuingMicro.setVisibility(View.GONE);
|
||||
mIvQueuingMicro.setVisibility(View.GONE);
|
||||
gameBinding.bottomView.updateQueuingMicButton();
|
||||
}
|
||||
updateMicroView();
|
||||
|
@@ -215,105 +215,6 @@
|
||||
app:shaderStartColor="#FA4771" />
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/boomLayout"
|
||||
android:layout_width="@dimen/dp_55"
|
||||
android:layout_height="@dimen/dp_55"
|
||||
android:layout_above="@id/iv_team_pk"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:visibility="gone"
|
||||
tools:translationY="500dp"
|
||||
tools:visibility="visible">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/boomIcon"
|
||||
android:layout_width="@dimen/dp_37"
|
||||
android:layout_gravity="center_horizontal|top"
|
||||
android:layout_height="@dimen/dp_51"
|
||||
tools:rotation="30"
|
||||
tools:src="@drawable/room_team_pk_icon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/boomProMax"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/ic_room_boom_pro_bg"
|
||||
android:layout_marginHorizontal="@dimen/dp_3"
|
||||
android:layout_height="@dimen/dp_8"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/boomPro"
|
||||
android:layout_width="1dp"
|
||||
tools:layout_width="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_room_boom_pro"
|
||||
android:layout_marginHorizontal="@dimen/dp_3_5"
|
||||
android:layout_height="@dimen/dp_8"/>
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_team_pk"
|
||||
android:layout_width="@dimen/dp_38"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:layout_above="@id/iv_config_entrance"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:src="@drawable/room_team_pk_icon"
|
||||
android:visibility="gone"
|
||||
tools:translationY="500dp"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_config_entrance"
|
||||
android:layout_width="@dimen/dp_55"
|
||||
android:layout_height="@dimen/dp_55"
|
||||
android:layout_above="@id/iv_game"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/room_ic_game"
|
||||
android:visibility="gone"
|
||||
tools:translationY="500dp"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_game"
|
||||
android:layout_width="@dimen/dp_55"
|
||||
android:layout_height="@dimen/dp_55"
|
||||
android:layout_above="@id/iv_queuing_micro"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/room_ic_game"
|
||||
android:visibility="gone"
|
||||
tools:translationY="500dp"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_queuing_micro"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/bottom_view"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:adjustViewBounds="true"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/ic_dating_queuing_micro"
|
||||
android:visibility="gone"
|
||||
tools:contentDescription="@string/layout_fragment_av_room_game_05"
|
||||
tools:translationY="500dp"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@@ -5,6 +5,11 @@
|
||||
|
||||
<data>
|
||||
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="android.view.View.OnClickListener" />
|
||||
|
||||
<variable
|
||||
name="roomInfo"
|
||||
type="com.chwl.core.room.bean.RoomInfo" />
|
||||
@@ -34,6 +39,112 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 漂浮按钮-->
|
||||
<LinearLayout
|
||||
android:id="@+id/floatBtnLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnFold"
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:src="@drawable/ic_eyes_open"
|
||||
android:layout_marginBottom="@dimen/dp_14"
|
||||
android:layout_height="@dimen/dp_32"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/floatBtnLayoutFold"
|
||||
android:layout_width="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_height="1px">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_team_pk"
|
||||
android:layout_width="@dimen/dp_38"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:src="@drawable/room_team_pk_icon"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_queuing_micro"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:adjustViewBounds="true"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/ic_dating_queuing_micro"
|
||||
android:visibility="gone"
|
||||
tools:contentDescription="@string/layout_fragment_av_room_game_05"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/boomLayout"
|
||||
android:layout_width="@dimen/dp_55"
|
||||
android:layout_height="@dimen/dp_55"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/boomIcon"
|
||||
android:layout_width="@dimen/dp_37"
|
||||
android:layout_gravity="center_horizontal|top"
|
||||
android:layout_height="@dimen/dp_51"
|
||||
tools:rotation="30"
|
||||
tools:src="@drawable/room_team_pk_icon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/boomProMax"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/ic_room_boom_pro_bg"
|
||||
android:layout_marginHorizontal="@dimen/dp_3"
|
||||
android:layout_height="@dimen/dp_8"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/boomPro"
|
||||
android:layout_width="1dp"
|
||||
tools:layout_width="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_room_boom_pro"
|
||||
android:layout_marginHorizontal="@dimen/dp_3_5"
|
||||
android:layout_height="@dimen/dp_8"/>
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_config_entrance"
|
||||
android:layout_width="@dimen/dp_55"
|
||||
android:layout_height="@dimen/dp_55"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/room_ic_game"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_game"
|
||||
android:layout_width="@dimen/dp_55"
|
||||
android:layout_height="@dimen/dp_55"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/room_ic_game"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -41,7 +152,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Space
|
||||
<androidx.legacy.widget.Space
|
||||
android:id="@+id/space_title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
@@ -182,7 +293,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
<com.chwl.app.ui.widget.BonsellaJoinAttackLayout
|
||||
android:id="@+id/giftComboLayout"
|
||||
android:layout_width="match_parent"
|
||||
@@ -230,6 +340,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</layout>
|
@@ -169,78 +169,6 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@+id/bottom_view"
|
||||
tools:translationY="-100dp">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/boomLayout"
|
||||
android:layout_width="@dimen/dp_55"
|
||||
android:layout_height="@dimen/dp_55"
|
||||
android:layout_above="@id/iv_config_entrance"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/boomIcon"
|
||||
android:layout_width="@dimen/dp_37"
|
||||
android:layout_gravity="center_horizontal|top"
|
||||
android:layout_height="@dimen/dp_51"
|
||||
tools:src="@drawable/room_team_pk_icon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/boomProMax"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/ic_room_boom_pro_bg"
|
||||
android:layout_marginHorizontal="@dimen/dp_3"
|
||||
android:layout_height="@dimen/dp_8"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/boomPro"
|
||||
android:layout_width="1dp"
|
||||
tools:layout_width="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_room_boom_pro"
|
||||
android:layout_marginHorizontal="@dimen/dp_3_5"
|
||||
android:layout_height="@dimen/dp_8"/>
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_config_entrance"
|
||||
android:layout_width="@dimen/dp_55"
|
||||
android:layout_height="@dimen/dp_55"
|
||||
android:layout_above="@id/iv_game"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:onClick="@{click}"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_game"
|
||||
android:layout_width="@dimen/dp_55"
|
||||
android:layout_height="@dimen/dp_55"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:alpha="1"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/room_ic_game"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.chwl.app.avroom.widget.BottomView
|
||||
android:id="@+id/bottom_view"
|
||||
|
@@ -1106,6 +1106,9 @@ public final class AvRoomDataManager {
|
||||
public boolean isSingleRoom() {
|
||||
return mCurrentRoomInfo != null && mCurrentRoomInfo.getType() == RoomInfo.ROOM_TYPE_SINGLE;
|
||||
}
|
||||
public boolean isGameRoom() {
|
||||
return mCurrentRoomInfo != null && mCurrentRoomInfo.getType() == RoomInfo.ROOMTYPE_GAME;
|
||||
}
|
||||
public boolean isHomeParty() {
|
||||
return mCurrentRoomInfo != null && mCurrentRoomInfo.getType() == RoomInfo.ROOMTYPE_HOME_PARTY;
|
||||
}
|
||||
|
Reference in New Issue
Block a user