贵族UI优化
This commit is contained in:
@@ -108,8 +108,6 @@ class MeFragment : BaseFragment(), View.OnClickListener {
|
||||
@SuppressLint("CheckResult", "SetTextI18n")
|
||||
override fun initiate() {
|
||||
EventBus.getDefault().register(this)
|
||||
vipViewModel.getVipPageInfo()
|
||||
|
||||
mCompositeDisposable.add(
|
||||
IMNetEaseManager.get()
|
||||
.relationShipEventObservable
|
||||
@@ -315,9 +313,8 @@ class MeFragment : BaseFragment(), View.OnClickListener {
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
setUserData()
|
||||
if (mUserInfo?.isReview == true) {
|
||||
requestUpdateUserInfo()
|
||||
}
|
||||
requestUpdateUserInfo()
|
||||
vipViewModel.getVipPageInfo()
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
|
@@ -83,7 +83,7 @@ class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
|
||||
VipRemainTimeDialog.newInstance().show(this)
|
||||
}
|
||||
|
||||
binding.stvRank.setOnClickListener {
|
||||
binding.ivRank.setOnClickListener {
|
||||
VipRankActivity.start(this)
|
||||
}
|
||||
|
||||
@@ -207,8 +207,8 @@ class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
|
||||
binding.clOpenVipFirst.isGone = !isDiscountPrice
|
||||
if (isDiscountPrice) {
|
||||
binding.tvFirstOpenPriceOriginal.paint.flags = Paint.STRIKE_THRU_TEXT_FLAG
|
||||
binding.tvFirstOpenPriceOriginal.text = chargeBean.oriPrice
|
||||
binding.tvFirstOpenPrice.text = "仅需${chargeBean.money}¥"
|
||||
binding.tvFirstOpenPriceOriginal.text = "原价${chargeBean.oriPrice}/月"
|
||||
binding.tvFirstOpenPrice.text = "${chargeBean.money}"
|
||||
} else {
|
||||
binding.tvOpenVip.text = "${chargeBean.getMoney()}立刻成为魔力贵族"
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@ import com.mango.moshen.databinding.ActivityVipRankBinding
|
||||
import com.mango.moshen.ui.utils.RVDelegate
|
||||
import com.mango.moshen.ui.utils.load
|
||||
import com.mango.moshen.ui.utils.loadAvatar
|
||||
import com.mango.moshen.ui.utils.loadFromUrl
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
@@ -43,7 +44,7 @@ class VipRankActivity : BaseViewBindingActivity<ActivityVipRankBinding>() {
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun init() {
|
||||
initWhiteTitleBar("贵族设置")
|
||||
initWhiteTitleBar("")
|
||||
bannerRvDelegate = RVDelegate.Builder<VipBannerInfo>()
|
||||
.setLayoutManager(LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false))
|
||||
.setRecyclerView(binding.rvBanner)
|
||||
@@ -86,7 +87,7 @@ class VipRankActivity : BaseViewBindingActivity<ActivityVipRankBinding>() {
|
||||
binding.tvVipInfo.isVisible = false
|
||||
binding.llMyValue.isVisible = true
|
||||
binding.tvMyValue.text = it.score?.toString().ifNullOrEmpty { "0" }
|
||||
binding.ivMyVipLogo.load(it.vipLogo)
|
||||
binding.ivMyVipLogo.loadFromUrl(it.vipLogo)
|
||||
|
||||
if (it.rankNo == 0 || it.rankNo == null) {
|
||||
binding.tvNoRank.isVisible = true
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.5 KiB |
BIN
app/src/main/res/drawable-xhdpi/bg_vip_first_open_btn.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/bg_vip_first_open_btn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
BIN
app/src/main/res/drawable-xhdpi/vip_first_open_btn_bg.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/vip_first_open_btn_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 8.0 KiB |
@@ -80,7 +80,7 @@
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:drawablePadding="5dp"
|
||||
android:textColor="#F7DA94"
|
||||
android:textSize="@dimen/dp_14"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="0" />
|
||||
</LinearLayout>
|
||||
|
@@ -148,7 +148,7 @@
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_open_vip"
|
||||
android:layout_width="300dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="30dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -178,60 +178,87 @@
|
||||
|
||||
<View
|
||||
android:id="@+id/view_open_vip_first_bg"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_width="335dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="17dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:background="@drawable/bg_vip_open_btn"
|
||||
android:background="@drawable/bg_vip_first_open_btn"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_first_open_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:text="即刻体验大鹅贵族"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_first_open_price_original"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="7dp"
|
||||
android:textColor="#BABBCD"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_first_open_price"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_first_open_price"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_first_open_price"
|
||||
tools:text="18" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_first_open_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="#EA2B0D"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginStart="19dp"
|
||||
android:baselineAligned="true"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_open_vip_first_bg"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_open_vip_first_bg"
|
||||
tools:text="仅需12¥" />
|
||||
app:layout_constraintTop_toTopOf="@id/view_open_vip_first_bg">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="仅需"
|
||||
android:textColor="#FFE3AF"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_first_open_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFE3AF"
|
||||
android:textSize="24sp"
|
||||
tools:text="12¥" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="/月"
|
||||
android:textColor="#FFE3AF"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_first_open_price_original"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:textColor="#8B7245"
|
||||
android:textSize="10sp"
|
||||
tools:text="18" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_open_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginStart="65dp"
|
||||
android:src="@drawable/bg_vip_first_charge_tip"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:background="@drawable/vip_first_open_btn_bg"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="true"
|
||||
android:text="即刻体验"
|
||||
android:textColor="#633000"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_open_vip_first_bg"
|
||||
app:layout_constraintDimensionRatio="218:84"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_open_vip_first_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_open_vip_first_bg" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -256,26 +283,15 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_bar" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/stv_rank"
|
||||
<ImageView
|
||||
android:id="@+id/iv_rank"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:drawableStart="@drawable/vip_rank_ic_entrance"
|
||||
android:drawablePadding="2dp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:text="贵族榜"
|
||||
android:textColor="#F5C277"
|
||||
android:textSize="10sp"
|
||||
app:corner="@dimen/dp_20"
|
||||
android:src="@drawable/vip_rank_ic_entrance"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/magic_indicator"
|
||||
app:stroke_color="#FFE3AF"
|
||||
app:stroke_width="1dp" />
|
||||
app:layout_constraintTop_toBottomOf="@id/magic_indicator" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_my_vip_info"
|
||||
|
@@ -7,15 +7,6 @@
|
||||
android:background="#221F20"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.mango.moshen.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_top"
|
||||
android:layout_width="0dp"
|
||||
@@ -26,6 +17,15 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mango.moshen.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_msg"
|
||||
android:layout_width="0dp"
|
||||
@@ -66,6 +66,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="50dp"
|
||||
tools:itemCount="5"
|
||||
tools:listitem="@layout/item_vip_rank" />
|
||||
@@ -113,15 +114,13 @@
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/iv_my_vip_logo"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="8dp" />
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="30dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_my_nick"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
@@ -153,6 +152,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#F7DA94"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="99999" />
|
||||
|
||||
</LinearLayout>
|
||||
|
Reference in New Issue
Block a user