feat : 修改房间背景 弹窗, 首页 房间列表 banner item
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package com.chwl.app.avroom.dialog
|
||||
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.databinding.DialogRoomBgPreviewBinding
|
||||
|
||||
class RoomBgPreviewDialog : BaseDialogFragment<DialogRoomBgPreviewBinding>() {
|
||||
|
||||
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var height = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var dimAmount = 0.3f
|
||||
override var gravity = Gravity.BOTTOM
|
||||
|
||||
|
||||
override fun init() {
|
||||
|
||||
binding.btnBack.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
binding.close.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
binding.prvView.setOnClickListener {
|
||||
|
||||
}
|
||||
|
||||
// binding.bg.loadUrl("https://image.pekolive.com/ca486d8c-9c4c-40ff-ab0a-58982622e2fb.jpg")
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,82 @@
|
||||
package com.chwl.app.avroom.dialog
|
||||
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.bindadapter.BaseAdapter
|
||||
import com.chwl.app.bindadapter.BindingViewHolder
|
||||
import com.chwl.app.common.widget.dialog.DialogManager
|
||||
import com.chwl.app.databinding.DialogRoomBgSetBinding
|
||||
import com.chwl.core.gift.bean.RoomBgInfo
|
||||
import com.chwl.library.common.util.ClickUtils.click
|
||||
import com.example.lib_utils.ktx.getDimension
|
||||
import com.example.lib_utils.ktx.getString
|
||||
|
||||
class RoomBgSetDialog : BaseDialogFragment<DialogRoomBgSetBinding>() {
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var height = R.dimen.dp_323.getDimension().toInt()
|
||||
override var dimAmount = 0f
|
||||
override var gravity = Gravity.BOTTOM
|
||||
|
||||
lateinit var mAdapter: RoomBgAdapter
|
||||
|
||||
|
||||
override fun init() {
|
||||
|
||||
mAdapter = RoomBgAdapter()
|
||||
mAdapter.setNewData(arrayListOf(RoomBgInfo(),RoomBgInfo(),RoomBgInfo(),RoomBgInfo(),))
|
||||
|
||||
binding.rvList.layoutManager = LinearLayoutManager(context,RecyclerView.HORIZONTAL,false)
|
||||
binding.rvList.adapter = mAdapter
|
||||
|
||||
mAdapter.setOnItemClickListener { adapter, view, position ->
|
||||
|
||||
}
|
||||
|
||||
|
||||
mAdapter.setOnItemChildClickListener { adapter, view, position ->
|
||||
when (view.id) {
|
||||
|
||||
R.id.statusPlay -> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
R.id.statusBuy -> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
else -> {}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
binding.btnMore.click {
|
||||
DialogManager(context).showOkDialog(R.string.Purchases_hint_info.getString())
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class RoomBgAdapter() : BaseAdapter<RoomBgInfo>(R.layout.item_room_bg_set, 1) {
|
||||
|
||||
|
||||
override fun convert(helper: BindingViewHolder, data: RoomBgInfo?) {
|
||||
|
||||
|
||||
|
||||
helper.addOnClickListener(R.id.statusPlay)
|
||||
helper.addOnClickListener(R.id.statusBuy)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@@ -1,6 +1,7 @@
|
||||
package com.chwl.app.avroom.dialog;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
@@ -16,6 +17,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.chwl.app.R;
|
||||
import com.chwl.app.UIHelper;
|
||||
import com.chwl.app.application.GlobalHandleManager;
|
||||
import com.chwl.app.avroom.activity.CreatePKActivity;
|
||||
import com.chwl.app.avroom.activity.RoomSettingActivity;
|
||||
import com.chwl.app.avroom.activity.RoomTypeSwitchActivity;
|
||||
@@ -133,6 +135,7 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
addVipSendBroadcastAction(optAdapter); //小喇叭
|
||||
// addRedPacketAction(optAdapter); //红包
|
||||
addRoomSettingAction(optAdapter); //房间设置
|
||||
addRoomSettingBackPicAction(optAdapter); //房间背景设置
|
||||
addGiftEffectAction(optAdapter); //礼物特效
|
||||
// addOpenOrClosePublicScreenAction(optAdapter); //公屏开关
|
||||
// addRedPackageSwitch(); // 开关红包
|
||||
@@ -572,6 +575,27 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 房间背景设置
|
||||
*
|
||||
* @param optAdapter
|
||||
*/
|
||||
private void addRoomSettingBackPicAction(OptAdapter optAdapter) {
|
||||
if (SuperAdminUtil.isSuperAdmin()) {
|
||||
return;
|
||||
}
|
||||
if (AvRoomDataManager.get().isManager()) {
|
||||
optAdapter.addData(new OptAction(R.drawable.icon_room_setting, getContext().getResources().getString(R.string.roomBg), () -> {
|
||||
Activity activity = GlobalHandleManager.get().getActivity();
|
||||
if (activity != null) {
|
||||
RoomBgSetDialog roomBgSetDialog = new RoomBgSetDialog();
|
||||
roomBgSetDialog.show(activity);
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 房间类型切换
|
||||
*
|
||||
|
@@ -8,7 +8,7 @@ import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.RecyclerView.RecycledViewPool
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils
|
||||
@@ -27,13 +27,20 @@ import com.tencent.qgame.animplayer.AnimView
|
||||
/**
|
||||
* create by lvzebiao @2019/11/13
|
||||
*/
|
||||
class HomeRoomAdapter : BaseQuickAdapter<HomeRoomInfo, BaseViewHolder>(R.layout.home_item_room) {
|
||||
class HomeRoomAdapter : BaseMultiItemQuickAdapter<HomeRoomInfo, BaseViewHolder> {
|
||||
private var micUserItemViewPool = RecycledViewPool().apply {
|
||||
setMaxRecycledViews(0, 50)
|
||||
}
|
||||
|
||||
|
||||
|
||||
private val isRTL = UiUtils.isRtl(AppUtils.getApp())
|
||||
|
||||
constructor(data: MutableList<HomeRoomInfo>?) : super(data){
|
||||
addItemType(HomeRoomInfo.TYPE_ROOM,R.layout.home_item_room)
|
||||
addItemType(HomeRoomInfo.TYPE_BANNER,R.layout.home_item_banner)
|
||||
}
|
||||
|
||||
override fun onCreateDefViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
|
||||
return super.onCreateDefViewHolder(parent, viewType).apply {
|
||||
val micUserRecyclerView = this.getView<RecyclerView>(R.id.recycler_view_users)
|
||||
|
@@ -6,15 +6,15 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.home.adapter.HomeRoomAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.home.bean.HomeRoomInfo
|
||||
import com.chwl.app.avroom.activity.AVRoomActivity
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.HomeTabRoomFragmentBinding
|
||||
import com.chwl.app.home.HomeMeViewModel
|
||||
import com.chwl.app.home.adapter.HomeRoomAdapter
|
||||
import com.chwl.app.support.FragmentVisibleStateHelper
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.home.bean.HomeRoomInfo
|
||||
|
||||
/**
|
||||
* 收藏
|
||||
@@ -49,7 +49,7 @@ class HomeRoomCollectListFragment : BaseViewBindingFragment<HomeTabRoomFragmentB
|
||||
}
|
||||
|
||||
private fun initListView() {
|
||||
adapter = HomeRoomAdapter()
|
||||
adapter = HomeRoomAdapter(arrayListOf())
|
||||
adapter.onItemClickListener =
|
||||
BaseQuickAdapter.OnItemClickListener { _: BaseQuickAdapter<*, *>?, _: View?, position: Int ->
|
||||
val homePlayInfo: HomeRoomInfo? = adapter.getItem(position)
|
||||
|
@@ -6,15 +6,15 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.home.adapter.HomeRoomAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.home.bean.HomeRoomInfo
|
||||
import com.chwl.app.avroom.activity.AVRoomActivity
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.HomeTabRoomFragmentBinding
|
||||
import com.chwl.app.home.HomeMeViewModel
|
||||
import com.chwl.app.home.adapter.HomeRoomAdapter
|
||||
import com.chwl.app.support.FragmentVisibleStateHelper
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.home.bean.HomeRoomInfo
|
||||
|
||||
/**
|
||||
* 最近访问记录
|
||||
@@ -49,7 +49,7 @@ class HomeRoomHistoryListFragment : BaseViewBindingFragment<HomeTabRoomFragmentB
|
||||
}
|
||||
|
||||
private fun initListView() {
|
||||
adapter = HomeRoomAdapter()
|
||||
adapter = HomeRoomAdapter(arrayListOf())
|
||||
adapter.onItemClickListener =
|
||||
BaseQuickAdapter.OnItemClickListener { _: BaseQuickAdapter<*, *>?, _: View?, position: Int ->
|
||||
val homePlayInfo: HomeRoomInfo? = adapter.getItem(position)
|
||||
|
@@ -7,15 +7,15 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.home.HomeViewModel
|
||||
import com.chwl.app.home.adapter.HomeRoomAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.home.bean.HomeRoomInfo
|
||||
import com.chwl.app.avroom.activity.AVRoomActivity
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.HomeTabRoomFragmentBinding
|
||||
import com.chwl.app.home.HomeViewModel
|
||||
import com.chwl.app.home.adapter.HomeRoomAdapter
|
||||
import com.chwl.app.support.FragmentVisibleStateHelper
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.home.bean.HomeRoomInfo
|
||||
|
||||
/**
|
||||
* 首页-房间列表
|
||||
@@ -60,7 +60,7 @@ class HomeTabRoomFragment : BaseViewBindingFragment<HomeTabRoomFragmentBinding>(
|
||||
}
|
||||
|
||||
private fun initListView() {
|
||||
adapter = HomeRoomAdapter()
|
||||
adapter = HomeRoomAdapter(arrayListOf())
|
||||
adapter.onItemClickListener =
|
||||
BaseQuickAdapter.OnItemClickListener { _: BaseQuickAdapter<*, *>?, _: View?, position: Int ->
|
||||
val homePlayInfo: HomeRoomInfo? = adapter.getItem(position)
|
||||
|
@@ -28,7 +28,6 @@ import com.chwl.app.home.helper.OpenRoomHelper
|
||||
import com.chwl.app.module_hall.HallDataManager
|
||||
import com.chwl.app.module_hall.hall.activity.ModuleClanActivity
|
||||
import com.chwl.app.module_hall.hall.activity.ModuleHallActivity
|
||||
import com.chwl.app.music.activity.MusicListActivity
|
||||
import com.chwl.app.support.FragmentVisibleStateHelper
|
||||
import com.chwl.app.ui.im.RouterHandler
|
||||
import com.chwl.app.ui.relation.AttentionListActivity
|
||||
@@ -371,8 +370,7 @@ class MeFragment : BaseFragment(), View.OnClickListener {
|
||||
R.id.tv_user_name -> {
|
||||
//todo do 测试按钮
|
||||
if (BuildConfig.DEBUG) {
|
||||
// PhotoPickActivity.start(requireActivity(), PhotoPickActivity.GIF)
|
||||
MusicListActivity.openLocalMusicList(context)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -35,7 +35,11 @@ public class TopRoundLinearLayout extends LinearLayout {
|
||||
private void init() {
|
||||
mPath = new Path();
|
||||
mPath.setFillType(Path.FillType.EVEN_ODD);
|
||||
mRadius = ScreenUtil.dip2px(10);
|
||||
mRadius = ScreenUtil.dip2px(16);
|
||||
}
|
||||
|
||||
public void setRadius(int mRadius) {
|
||||
this.mRadius = mRadius;
|
||||
}
|
||||
|
||||
private void checkPathChanged() {
|
||||
|
@@ -272,6 +272,8 @@
|
||||
android:id="@+id/layout_theme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:onClick="@{click}">
|
||||
|
||||
<TextView
|
||||
|
128
app/src/main/res/layout/dialog_room_bg_preview.xml
Normal file
128
app/src/main/res/layout/dialog_room_bg_preview.xml
Normal file
@@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/close"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_view"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/prvView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardBackgroundColor="@color/transparent"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_view"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<com.chwl.library.widget.SVGAView
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="240dp"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_height="520dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="240dp"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_height="520dp"/>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<com.chwl.app.ui.widget.TopRoundLinearLayout
|
||||
android:id="@+id/bottom_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="173dp"
|
||||
android:background="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnBack"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/icon_user_back"
|
||||
app:layout_constraintStart_toStartOf="@+id/bottom_view"
|
||||
app:layout_constraintTop_toTopOf="@+id/bottom_view" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="13dp"
|
||||
android:text="@string/Purchases_Tips"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/bottom_view" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="23dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/Purchases_hint"
|
||||
android:textColor="@color/white_tran_60"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title" />
|
||||
|
||||
<com.chwl.library.widget.text.DrawableTextView
|
||||
android:id="@+id/price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginBottom="44dp"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/s_15Days"
|
||||
android:textColor="#FF8c03"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:dt_drawableLeftHeight="26dp"
|
||||
app:dt_drawableLeftSrc="@drawable/ic_coin_84"
|
||||
app:dt_drawableLeftWidth="26dp"
|
||||
app:dt_drawableType="shape"
|
||||
app:dt_soildColor="@color/transparent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
<com.chwl.library.widget.text.DrawableTextView
|
||||
android:id="@+id/btnConfirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:gravity="center"
|
||||
android:minWidth="121dp"
|
||||
android:minHeight="38dp"
|
||||
android:paddingHorizontal="30dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:text="@string/confirm_payment"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
app:dt_drawableType="shape"
|
||||
app:dt_endColor="#FCC074"
|
||||
app:dt_radius="25dp"
|
||||
app:dt_startColor="#E29030"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/price"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/price" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
104
app/src/main/res/layout/dialog_room_bg_set.xml
Normal file
104
app/src/main/res/layout/dialog_room_bg_set.xml
Normal file
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.chwl.app.ui.widget.TopRoundLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_323"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="#F2000000"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<!-- 顶部 操作栏-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnFree"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/dp_15"
|
||||
android:paddingVertical="@dimen/dp_10"
|
||||
android:text="@string/Free"
|
||||
android:textColor="@color/white_tran_60"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnPay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:paddingHorizontal="@dimen/dp_15"
|
||||
android:paddingVertical="@dimen/dp_10"
|
||||
android:text="@string/pay"
|
||||
android:textColor="@color/white_tran_60"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/btnFree"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnCustom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:paddingHorizontal="@dimen/dp_15"
|
||||
android:paddingVertical="@dimen/dp_10"
|
||||
android:text="@string/Custom"
|
||||
android:textColor="@color/white_tran_60"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/btnPay"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<com.chwl.library.widget.text.DrawableTextView
|
||||
android:id="@+id/btnCreate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:gravity="center"
|
||||
android:minWidth="@dimen/dp_81"
|
||||
android:minHeight="@dimen/dp_22"
|
||||
android:paddingHorizontal="@dimen/dp_8"
|
||||
android:paddingVertical="@dimen/dp_2"
|
||||
android:text="@string/Create_New"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:dt_drawableType="shape"
|
||||
app:dt_endColor="#FCC074"
|
||||
app:dt_radius="@dimen/dp_25"
|
||||
app:dt_startColor="#E29030"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnMore"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnMore"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:src="@drawable/ic_cp_list_more"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="#AFB1B3"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- 背景列表-->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvList"
|
||||
android:layout_width="match_parent"
|
||||
android:paddingHorizontal="@dimen/dp_5"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</com.chwl.app.ui.widget.TopRoundLinearLayout>
|
24
app/src/main/res/layout/home_item_banner.xml
Normal file
24
app/src/main/res/layout/home_item_banner.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.zhpan.bannerview.BannerViewPager
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:id="@+id/banner_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginHorizontal="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:background="@drawable/base_shape_negative_5dp"
|
||||
app:bvp_auto_play="true"
|
||||
app:bvp_can_loop="true"
|
||||
app:bvp_indicator_checked_color="@color/color_9168FA"
|
||||
app:bvp_indicator_normal_color="@color/color_B3B3C3"
|
||||
app:bvp_indicator_radius="@dimen/dp_4"
|
||||
app:bvp_indicator_visibility="visible"
|
||||
app:bvp_page_style="multi_page_scale"
|
||||
app:layout_constraintDimensionRatio="351:80"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
143
app/src/main/res/layout/item_room_bg_set.xml
Normal file
143
app/src/main/res/layout/item_room_bg_set.xml
Normal file
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
tools:background="@color/black">
|
||||
|
||||
<com.chwl.app.common.widget.RectRoundImageView
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="@dimen/dp_135"
|
||||
android:layout_height="@dimen/dp_180"
|
||||
app:borderRadius="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:type="round"
|
||||
android:src="@drawable/bg_login" />
|
||||
|
||||
<com.chwl.library.widget.text.DrawableTextView
|
||||
android:id="@+id/select"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="visible"
|
||||
app:dt_drawableType="shape"
|
||||
app:dt_radius="@dimen/dp_9"
|
||||
app:dt_soildColor="@color/transparent"
|
||||
app:dt_strikeColor="#FF8C03"
|
||||
app:dt_strikeWidth="@dimen/dp_2"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/bg"
|
||||
tools:visibility="gone" />
|
||||
|
||||
|
||||
<com.chwl.library.widget.text.DrawableTextView
|
||||
android:id="@+id/statusLimit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:gravity="center"
|
||||
android:minWidth="@dimen/dp_48"
|
||||
android:paddingHorizontal="@dimen/dp_4"
|
||||
android:paddingVertical="@dimen/dp_1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:dt_drawableType="shape"
|
||||
app:dt_radius="@dimen/dp_10"
|
||||
app:dt_soildColor="#80000000"
|
||||
app:layout_constraintStart_toStartOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/bg"
|
||||
tools:text="@string/Original"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/statusGif"
|
||||
android:layout_width="@dimen/dp_27"
|
||||
android:layout_height="@dimen/dp_19"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:src="@drawable/ic_draw_w_arrow"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/statusPlay"
|
||||
app:layout_constraintEnd_toStartOf="@+id/statusPlay"
|
||||
app:layout_constraintTop_toTopOf="@id/statusPlay"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/statusPlay"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_19"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:src="@drawable/ic_draw_w_arrow"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/bg"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/statusDel"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_19"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:src="@drawable/ic_delete_room_album"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/bg"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<com.chwl.library.widget.text.DrawableTextView
|
||||
android:id="@+id/price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:drawablePadding="@dimen/dp_3"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
|
||||
android:visibility="gone"
|
||||
app:dt_drawableLeftHeight="@dimen/dp_20"
|
||||
app:dt_drawableLeftSrc="@drawable/ic_coin_84"
|
||||
app:dt_drawableLeftWidth="@dimen/dp_20"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintStart_toStartOf="@id/bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/bg"
|
||||
tools:text="11111"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.chwl.library.widget.text.DrawableTextView
|
||||
android:id="@+id/statusBuy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:gravity="center"
|
||||
android:minWidth="@dimen/dp_71"
|
||||
android:minHeight="@dimen/dp_22"
|
||||
android:paddingHorizontal="@dimen/dp_7"
|
||||
android:paddingVertical="@dimen/dp_1"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="gone"
|
||||
app:dt_drawableType="shape"
|
||||
app:dt_radius="@dimen/dp_10"
|
||||
app:dt_soildColor="#373639"
|
||||
app:dt_strikeColor="@color/white"
|
||||
app:dt_strikeWidth="@dimen/dp_1"
|
||||
app:layout_constraintEnd_toEndOf="@+id/price"
|
||||
app:layout_constraintStart_toStartOf="@+id/price"
|
||||
app:layout_constraintTop_toBottomOf="@+id/price"
|
||||
tools:text="@string/lu_reject"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -5324,6 +5324,18 @@ You cannot join again within 24 hours after leaving</string>
|
||||
<string name="vipSetTitle2">VIP Privilege</string>
|
||||
<string name="avatar2">Static Avatar</string>
|
||||
|
||||
<string name="roomBg">房间背景</string>
|
||||
<string name="Free">免费</string>
|
||||
<string name="Custom">自定义</string>
|
||||
<string name="Create_New">创建</string>
|
||||
<string name="in_review">in review</string>
|
||||
<string name="Original">Original</string>
|
||||
<string name="s_15Days">%s /15Days</string>
|
||||
<string name="Days_15">15Days</string>
|
||||
<string name="Purchases_Tips">Purchases Tips</string>
|
||||
<string name="Purchases_hint">Purchases Hint</string>
|
||||
<string name="Purchases_hint_info">Purchases Hint info</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
|
@@ -0,0 +1,5 @@
|
||||
package com.chwl.core.gift.bean;
|
||||
|
||||
public class RoomBgInfo {
|
||||
|
||||
}
|
@@ -84,6 +84,16 @@ class SVGAView : SVGAImageView, ILog {
|
||||
onViewStateChanged(0)
|
||||
return
|
||||
}
|
||||
|
||||
if (url?.endsWith(".svga") == false || url?.endsWith(".SVGA") == false) {
|
||||
this.resourceUrl = null
|
||||
this.setImageDrawable(null)
|
||||
onViewStateChanged(0)
|
||||
GlideUtils.instance().load(url,this)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if (url == resourceUrl && drawable is SVGADrawable) {
|
||||
logD("loadUrl() 已加载 isAnimating:$isAnimating")
|
||||
if (!isAnimating) {
|
||||
|
Reference in New Issue
Block a user