新用户首充UI修改
@@ -418,6 +418,7 @@ public class AVRoomActivity extends BaseMvpActivity<IAvRoomView, AvRoomPresenter
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
if (positionOffsetPixels != 0) {
|
||||
if (mAdapter == null || mAdapter.getItem(1) == null) return;
|
||||
((FakeSingleRoomFragment) mAdapter.getItem(1)).requestPreRoomInfo();
|
||||
if (singleRoomTipDialog != null) {
|
||||
singleRoomTipDialog.dismissAllowingStateLoss();
|
||||
|
@@ -135,8 +135,7 @@ class NewUserChargeGiftDialog : BaseViewBindingActivity<DialogNewUserChargeGiftB
|
||||
binding.rbPlanA,
|
||||
binding.rbPlanB,
|
||||
binding.rbPlanC,
|
||||
binding.rbPlanD,
|
||||
binding.rbPlanE
|
||||
binding.rbPlanD
|
||||
)
|
||||
var initChecked = false
|
||||
planViews.forEachIndexed { index, button ->
|
||||
@@ -181,19 +180,8 @@ class NewUserChargeGiftDialog : BaseViewBindingActivity<DialogNewUserChargeGiftB
|
||||
private fun updateCurrGoods(firstChargeGoods: FirstChargeGoods?) {
|
||||
firstChargeGoods?.let {
|
||||
currGoods = it
|
||||
val giveMoneyIndex = it.chargeProdTitle.lastIndexOf(it.giveMoney)
|
||||
if (giveMoneyIndex == -1) {
|
||||
binding.tvTitle.text = it.chargeProdTitle
|
||||
} else {
|
||||
val builder = SpannableStringBuilder(it.chargeProdTitle)
|
||||
builder.setSpan(
|
||||
ForegroundColorSpan(Color.parseColor("#FFA027")), giveMoneyIndex,
|
||||
giveMoneyIndex + (it.giveMoney?.length ?: 0),
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
)
|
||||
binding.tvTitle.text = builder
|
||||
}
|
||||
binding.tvCharge.isInvisible = it.isFinishCharge
|
||||
binding.tvTitle.text = it.chargeProdTitle
|
||||
binding.tvCharge.isEnabled = !it.isFinishCharge
|
||||
rewardAdapter.setNewData(it.firstChargeRewardList)
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 1015 B After Width: | Height: | Size: 3.0 KiB |
BIN
app/src/main/res/drawable-xhdpi/bg_new_user_charge_tips.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/bg_new_user_charge_charge_btn" android:state_enabled="true" />
|
||||
|
||||
<item android:drawable="@drawable/bg_new_user_charge_charged_btn"/>
|
||||
|
||||
</selector>
|
@@ -33,16 +33,16 @@
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginTop="87dp"
|
||||
android:gravity="center"
|
||||
tools:text="限时6天23小时9分"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
tools:text="限时6天23小时9分" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_plan"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="128dp"
|
||||
@@ -54,8 +54,8 @@
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_plan_a"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="63dp"
|
||||
android:layout_height="38dp"
|
||||
android:background="@drawable/bg_new_user_charge_rb_plan"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
@@ -66,8 +66,8 @@
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_plan_b"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="63dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_new_user_charge_rb_plan"
|
||||
android:button="@null"
|
||||
@@ -80,8 +80,8 @@
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_plan_c"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="63dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_new_user_charge_rb_plan"
|
||||
android:button="@null"
|
||||
@@ -94,8 +94,8 @@
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_plan_d"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="63dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_new_user_charge_rb_plan"
|
||||
android:button="@null"
|
||||
@@ -106,19 +106,6 @@
|
||||
android:textSize="14sp"
|
||||
tools:text="1元" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_plan_e"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_new_user_charge_rb_plan"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/color_selector_white_false_999"
|
||||
android:textSize="14sp"
|
||||
tools:text="1元" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
@@ -127,35 +114,47 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="#FF3987"
|
||||
android:textSize="12sp"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/rg_plan"
|
||||
tools:text="充A元额外送abC元礼包" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_tips"
|
||||
android:layout_width="84dp"
|
||||
android:layout_height="11dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:src="@drawable/bg_new_user_charge_tips"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginEnd="18dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clipToPadding="false"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_charge"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_tips" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_charge"
|
||||
android:layout_width="244dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginBottom="28dp"
|
||||
android:background="@drawable/bg_new_user_charge_charge_btn"
|
||||
android:background="@drawable/bg_sekector_new_user_charge_charge_btn"
|
||||
android:enabled="false"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
@@ -12,8 +13,8 @@
|
||||
android:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="279dp"
|
||||
android:layout_height="268dp"
|
||||
android:layout_width="316dp"
|
||||
android:layout_height="280dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/bg_new_user_charge_prize"
|
||||
android:gravity="center_horizontal"
|
||||
@@ -22,24 +23,26 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="94dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="73dp"
|
||||
android:layout_marginEnd="20dp" />
|
||||
android:layout_marginTop="77dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
tools:itemCount="1"
|
||||
tools:listitem="@layout/item_new_user_charge_reward"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_know"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/bg_new_user_charge_prize_ok" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:text="装扮已放至【我的装扮】"
|
||||
android:textColor="#E64A94"
|
||||
android:textSize="10sp" />
|
||||
|
@@ -7,10 +7,10 @@
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:background="@drawable/bg_new_user_charge_reward_item"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -20,8 +20,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_pic"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
@@ -33,13 +33,13 @@
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:lines="1"
|
||||
android:maxWidth="55dp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="10sp"
|
||||
android:textSize="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_bg"
|
||||
@@ -55,10 +55,9 @@
|
||||
android:paddingEnd="2dp"
|
||||
android:text="(14天)"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="10sp"
|
||||
android:textSize="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|