mireo 1.2.4
@ -16,6 +16,9 @@ class TranslatesBean(
|
||||
)
|
||||
|
||||
data class Translates(
|
||||
val mireo_unlock: String,
|
||||
val mireo_bonus_count_text: String,
|
||||
val mrieo_store_vip_title: String,
|
||||
val mireo_order_record: String,
|
||||
val mireo_activate_vip_content: String,
|
||||
val mireo_activate_vip_title: String,
|
||||
|
@ -91,6 +91,7 @@ object MsConstants {
|
||||
const val CONSTANTS_web_notification = "CONSTANTS_web_notification"
|
||||
const val CONSTANTS_SEARCH_STRING = "CONSTANTS_SEARCH_STRING"
|
||||
const val CONSTANTS_PREF_LAST_POPUP_TIME_VIP = "CONSTANTS_PREF_LAST_POPUP_TIME_VIP"
|
||||
const val CONSTANTS_PAY_REFRESH_DISMISS = "CONSTANTS_PAY_REFRESH_DISMISS"
|
||||
|
||||
|
||||
}
|
@ -347,6 +347,7 @@ class HomeActivity : AppActivity(), NavigationAdapter.OnNavigationListener,
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
GoogleApiAvailability.getInstance().makeGooglePlayServicesAvailable(this)
|
||||
.addOnCompleteListener {
|
||||
if (it.isSuccessful) {
|
||||
|
@ -167,8 +167,8 @@ class LanguageSwitchActivity : AppActivity(), StatusAction {
|
||||
.request(object : HttpCallbackProxy<HttpData<TranslatesBean>>(this) {
|
||||
override fun onHttpSuccess(result: HttpData<TranslatesBean>) {
|
||||
result.getData()?.let {
|
||||
MsMMKVUtils.getMMKV()
|
||||
.putString(MsConstants.Constants_Main_Video_info, "")
|
||||
// MsMMKVUtils.getMMKV()
|
||||
// .putString(MsConstants.Constants_Main_Video_info, "")
|
||||
lifecycleScope.launch {
|
||||
withContext(Dispatchers.IO) {
|
||||
TranslatesUtils.saveTranslates(it.translates)
|
||||
|
@ -1,10 +1,12 @@
|
||||
package com.localee.mireo.app.ui.activity
|
||||
|
||||
import android.graphics.Rect
|
||||
import android.os.Build
|
||||
import android.text.Html
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.android.billingclient.api.AcknowledgePurchaseParams
|
||||
@ -40,6 +42,7 @@ import com.localee.mireo.app.http.model.HttpData
|
||||
import com.localee.mireo.app.other.AppConfig
|
||||
import com.localee.mireo.app.other.Logger
|
||||
import com.localee.mireo.app.ui.adapter.MyCoinBuyAdapter
|
||||
import com.localee.mireo.app.ui.adapter.MyCoinBuyBigAdapter
|
||||
import com.localee.mireo.app.ui.adapter.MyVipBuyAdapter
|
||||
import com.localee.mireo.app.utils.DHStringUtils.getPublicRequest
|
||||
import com.localee.mireo.app.utils.MsMMKVUtils
|
||||
@ -56,24 +59,16 @@ import kotlinx.coroutines.launch
|
||||
class StoreActivity : AppActivity() {
|
||||
|
||||
private val title: TitleBar? by lazy { findViewById(R.id.title) }
|
||||
private val tvCoins: TextView? by lazy { findViewById(R.id.tv_coins) }
|
||||
private val recyclerCoinBig: RecyclerView? by lazy { findViewById(R.id.recycler_coin_big) }
|
||||
private val recyclerCoin: RecyclerView? by lazy { findViewById(R.id.recycler_coin) }
|
||||
private val recyclerView: RecyclerView? by lazy { findViewById(R.id.recyclerView) }
|
||||
private val tvBuy: TextView? by lazy { findViewById(R.id.tv_buy) }
|
||||
private val tvVipExpires: TextView? by lazy { findViewById(R.id.tv_vip_expires) }
|
||||
private val tvName: TextView? by lazy { findViewById(R.id.tv_name) }
|
||||
private val tvCoinRecharge: TextView? by lazy { findViewById(R.id.tv_coin_recharge) }
|
||||
private val tvCoinsText: TextView? by lazy { findViewById(R.id.tv_coins_text) }
|
||||
private val tvMemberTitle: TextView? by lazy { findViewById(R.id.tv_member_title) }
|
||||
private val tvMembership: TextView? by lazy { findViewById(R.id.tv_membership) }
|
||||
private val tvMember1: TextView? by lazy { findViewById(R.id.tv_member_1) }
|
||||
private val tvMember2: TextView? by lazy { findViewById(R.id.tv_member_2) }
|
||||
private val tvMember3: TextView? by lazy { findViewById(R.id.tv_member_3) }
|
||||
private val tvMember4: TextView? by lazy { findViewById(R.id.tv_member_4) }
|
||||
private val tvTitle: TextView? by lazy { findViewById(R.id.tv_title) }
|
||||
private val tvTitleVip: TextView? by lazy { findViewById(R.id.tv_title_vip) }
|
||||
private val tvHint: TextView? by lazy { findViewById(R.id.tv_hint) }
|
||||
|
||||
private var mAdapter: MyVipBuyAdapter? = null
|
||||
private var mCoinAdapter: MyCoinBuyAdapter? = null
|
||||
private var mCoinBigAdapter: MyCoinBuyBigAdapter? = null
|
||||
private var type = 0
|
||||
|
||||
private var billingClient: BillingClient? = null
|
||||
@ -82,6 +77,7 @@ class StoreActivity : AppActivity() {
|
||||
private var order_code = ""
|
||||
private var vipData: PaySettingsBean.Vip? = null
|
||||
private var coinsData: PaySettingsBean.Coins? = null
|
||||
private var coinsDataBig: PaySettingsBean.Coins? = null
|
||||
private var payReq: PayBean? = null
|
||||
private val scope = CoroutineScope(Dispatchers.Main)
|
||||
|
||||
@ -96,17 +92,8 @@ class StoreActivity : AppActivity() {
|
||||
if (TranslatesUtils.translates() != null) {
|
||||
title?.setTitle(TranslatesUtils.translates()?.mireo_store)
|
||||
title?.setRightTitle(TranslatesUtils.translates()?.mireo_restore)
|
||||
tvName?.text = TranslatesUtils.translates()?.mireo_store_recharge_discount
|
||||
tvVipExpires?.text = TranslatesUtils.translates()?.mireo_store_limited
|
||||
tvCoinRecharge?.text = TranslatesUtils.translates()?.mireo_coin_recharege
|
||||
tvCoinsText?.text = TranslatesUtils.translates()?.mireo_store_coins
|
||||
tvMemberTitle?.text = TranslatesUtils.translates()?.mireo_store_benefits
|
||||
tvMembership?.text = TranslatesUtils.translates()?.mireo_store_recharge
|
||||
tvMember1?.text = TranslatesUtils.translates()?.mireo_store_ad_free
|
||||
tvMember2?.text = TranslatesUtils.translates()?.mireo_store_exclusive
|
||||
tvMember3?.text = TranslatesUtils.translates()?.mireo_store_free_coins
|
||||
tvMember4?.text = TranslatesUtils.translates()?.mireo_store_only
|
||||
tvBuy?.text = TranslatesUtils.translates()?.mireo_buy_now
|
||||
tvTitle?.text = TranslatesUtils.translates()?.mireo_coin_recharege
|
||||
tvTitleVip?.text = TranslatesUtils.translates()?.mrieo_store_vip_title
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
tvHint?.text = Html.fromHtml(
|
||||
TranslatesUtils.translates()?.mireo_pay_hint ?: getString(R.string.store_tips),
|
||||
@ -122,33 +109,83 @@ class StoreActivity : AppActivity() {
|
||||
|
||||
recyclerCoin?.layoutManager =
|
||||
LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)
|
||||
recyclerView?.layoutManager =
|
||||
recyclerCoin?.layoutManager = GridLayoutManager(this, 3)
|
||||
recyclerCoin?.addItemDecoration(object : RecyclerView.ItemDecoration() {
|
||||
override fun getItemOffsets(
|
||||
outRect: Rect,
|
||||
view: View,
|
||||
parent: RecyclerView,
|
||||
state: RecyclerView.State
|
||||
) {
|
||||
outRect.left = resources.getDimension(R.dimen.dp_5).toInt()
|
||||
outRect.right = resources.getDimension(R.dimen.dp_5).toInt()
|
||||
outRect.bottom = resources.getDimension(R.dimen.dp_10).toInt()
|
||||
}
|
||||
})
|
||||
recyclerCoinBig?.layoutManager =
|
||||
LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)
|
||||
recyclerCoinBig?.layoutManager = GridLayoutManager(this, 2)
|
||||
recyclerCoinBig?.addItemDecoration(object : RecyclerView.ItemDecoration() {
|
||||
override fun getItemOffsets(
|
||||
outRect: Rect,
|
||||
view: View,
|
||||
parent: RecyclerView,
|
||||
state: RecyclerView.State
|
||||
) {
|
||||
outRect.left = resources.getDimension(R.dimen.dp_5).toInt()
|
||||
outRect.right = resources.getDimension(R.dimen.dp_5).toInt()
|
||||
outRect.bottom = resources.getDimension(R.dimen.dp_10).toInt()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
mCoinAdapter = MyCoinBuyAdapter()
|
||||
recyclerCoin?.adapter = mCoinAdapter
|
||||
|
||||
recyclerView?.layoutManager = LinearLayoutManager(this)
|
||||
mAdapter = MyVipBuyAdapter()
|
||||
recyclerView?.adapter = mAdapter
|
||||
mCoinBigAdapter = MyCoinBuyBigAdapter()
|
||||
recyclerCoinBig?.adapter = mCoinBigAdapter
|
||||
|
||||
mCoinAdapter?.setOnItemClickListener { adapter, view, position ->
|
||||
if (type == 1) {
|
||||
mAdapter?.currentPosition = -1
|
||||
mAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
type = 0
|
||||
mCoinAdapter?.currentPosition = position
|
||||
mCoinAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
mAdapter?.setOnItemClickListener { adapter, view, position ->
|
||||
if (type == 0) {
|
||||
if (type != 1) {
|
||||
mCoinAdapter?.currentPosition = -1
|
||||
mCoinAdapter?.notifyDataSetChanged()
|
||||
mCoinBigAdapter?.currentPosition = -1
|
||||
mCoinBigAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
type = 1
|
||||
mAdapter?.currentPosition = position
|
||||
mAdapter?.notifyDataSetChanged()
|
||||
|
||||
setOnPayNowClick()
|
||||
}
|
||||
mCoinAdapter?.setOnItemClickListener { adapter, view, position ->
|
||||
if (type != 0) {
|
||||
mAdapter?.currentPosition = -1
|
||||
mAdapter?.notifyDataSetChanged()
|
||||
mCoinBigAdapter?.currentPosition = -1
|
||||
mCoinBigAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
type = 0
|
||||
mCoinAdapter?.currentPosition = position
|
||||
mCoinAdapter?.notifyDataSetChanged()
|
||||
|
||||
setOnPayNowClick()
|
||||
}
|
||||
mCoinBigAdapter?.setOnItemClickListener { adapter, view, position ->
|
||||
if (type != 2) {
|
||||
mAdapter?.currentPosition = -1
|
||||
mAdapter?.notifyDataSetChanged()
|
||||
mCoinAdapter?.currentPosition = -1
|
||||
mCoinAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
type = 2
|
||||
mCoinBigAdapter?.currentPosition = position
|
||||
mCoinBigAdapter?.notifyDataSetChanged()
|
||||
|
||||
setOnPayNowClick()
|
||||
}
|
||||
|
||||
title?.setOnTitleBarListener(object : OnTitleBarListener {
|
||||
@ -183,54 +220,52 @@ class StoreActivity : AppActivity() {
|
||||
}
|
||||
})
|
||||
|
||||
setUI()
|
||||
initPay()
|
||||
}
|
||||
|
||||
private fun setUI() {
|
||||
tvCoins?.text = MsMMKVUtils.getAllCoin().toString()
|
||||
|
||||
fun setOnPayNowClick() {
|
||||
singleClick {
|
||||
if (!isConnect) {
|
||||
if (TranslatesUtils.translates() != null) {
|
||||
toast(TranslatesUtils.translates()?.mireo_g_pay_error.toString())
|
||||
} else {
|
||||
toast(getString(R.string.google_pay_error))
|
||||
}
|
||||
return@singleClick
|
||||
}
|
||||
if (type == 0) {
|
||||
coinsData =
|
||||
mCoinAdapter?.getItem(mCoinAdapter!!.currentPosition) as PaySettingsBean.Coins
|
||||
} else if (type == 1) {
|
||||
vipData =
|
||||
mAdapter?.getItem(mAdapter!!.currentPosition) as PaySettingsBean.Vip
|
||||
} else {
|
||||
coinsDataBig =
|
||||
mCoinBigAdapter?.getItem(mCoinBigAdapter!!.currentPosition) as PaySettingsBean.Coins
|
||||
}
|
||||
var idStr = ""
|
||||
if (type == 0) {
|
||||
idStr = coinsData?.id.toString()
|
||||
} else if (type == 1) {
|
||||
idStr = vipData?.id.toString()
|
||||
} else {
|
||||
idStr = coinsDataBig?.id.toString()
|
||||
}
|
||||
getCreateOrder(
|
||||
CreateOrderReqBean(
|
||||
idStr,
|
||||
"google",
|
||||
0,
|
||||
0
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun initData() {
|
||||
getPaySettings(null, null)
|
||||
|
||||
tvBuy?.setOnClickListener {
|
||||
|
||||
if (mAdapter?.currentPosition == -1 && mCoinAdapter?.currentPosition == -1) {
|
||||
if (TranslatesUtils.translates() != null) {
|
||||
toast(TranslatesUtils.translates()?.mireo_select_a_payment_item.toString())
|
||||
} else {
|
||||
toast(getString(R.string.select_a_payment_item))
|
||||
}
|
||||
return@setOnClickListener
|
||||
}
|
||||
singleClick {
|
||||
if (!isConnect) {
|
||||
if (TranslatesUtils.translates() != null) {
|
||||
toast(TranslatesUtils.translates()?.mireo_g_pay_error.toString())
|
||||
} else {
|
||||
toast(getString(R.string.google_pay_error))
|
||||
}
|
||||
return@singleClick
|
||||
}
|
||||
if (type == 0) {
|
||||
coinsData =
|
||||
mCoinAdapter!!.getItem(mCoinAdapter!!.currentPosition) as PaySettingsBean.Coins
|
||||
} else {
|
||||
vipData = mAdapter!!.getItem(mAdapter!!.currentPosition) as PaySettingsBean.Vip
|
||||
}
|
||||
getCreateOrder(
|
||||
CreateOrderReqBean(
|
||||
if (type == 0) coinsData?.id.toString() else vipData?.id.toString(),
|
||||
"google",
|
||||
0,
|
||||
0
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun getPaySettings(shortPlayId: Int?, videoId: Int?) {
|
||||
@ -242,11 +277,45 @@ class StoreActivity : AppActivity() {
|
||||
.request(object : HttpCallbackProxy<HttpData<PaySettingsBean>>(this) {
|
||||
override fun onHttpSuccess(result: HttpData<PaySettingsBean>) {
|
||||
result.getData()?.let {
|
||||
mCoinAdapter?.submitList(it.list_coins)
|
||||
mAdapter?.submitList(it.list_sub_vip)
|
||||
if (it.list_sub_vip.isNotEmpty()) {
|
||||
mAdapter?.submitList(it.list_sub_vip)
|
||||
recyclerView?.visibility = View.VISIBLE
|
||||
tvTitleVip?.visibility = View.VISIBLE
|
||||
|
||||
it.list_sub_vip.let { it1 -> querySubProductDetails(it1) }
|
||||
|
||||
} else {
|
||||
recyclerView?.visibility = View.GONE
|
||||
tvTitleVip?.visibility = View.GONE
|
||||
}
|
||||
if (it.list_coins.isNotEmpty()) {
|
||||
val small = it.list_coins.filter { coins -> coins.size == "small" }
|
||||
val big = it.list_coins.filter { coins -> coins.size == "big" }
|
||||
if (small.isNotEmpty()) {
|
||||
mCoinAdapter?.submitList(small)
|
||||
recyclerCoin?.visibility = View.VISIBLE
|
||||
} else {
|
||||
recyclerCoin?.visibility = View.GONE
|
||||
}
|
||||
if (big.isNotEmpty()) {
|
||||
mCoinBigAdapter?.submitList(big)
|
||||
recyclerCoinBig?.visibility = View.VISIBLE
|
||||
} else {
|
||||
recyclerCoinBig?.visibility = View.GONE
|
||||
}
|
||||
if (small?.isNotEmpty() == true) {
|
||||
small?.let { it1 -> queryInAppProductDetails(it1, "small") }
|
||||
}
|
||||
if (big?.isNotEmpty() == true) {
|
||||
big?.let { it1 -> queryInAppProductDetails(it1, "big") }
|
||||
}
|
||||
tvTitle?.visibility = View.VISIBLE
|
||||
} else {
|
||||
recyclerCoin?.visibility = View.GONE
|
||||
recyclerCoinBig?.visibility = View.GONE
|
||||
tvTitle?.visibility = View.GONE
|
||||
}
|
||||
|
||||
it.list_sub_vip?.let { it1 -> querySubProductDetails(it1) }
|
||||
it.list_coins?.let { it1 -> queryInAppProductDetails(it1) }
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -260,10 +329,10 @@ class StoreActivity : AppActivity() {
|
||||
BillingClient.BillingResponseCode.OK -> {
|
||||
for (purchase in purchases!!) {
|
||||
if (purchase.purchaseState == Purchase.PurchaseState.PURCHASED) {
|
||||
if (type == 0) {
|
||||
consumePurchase(purchase)
|
||||
} else {
|
||||
if (type == 1) {
|
||||
consumePurchaseSub(purchase)
|
||||
} else {
|
||||
consumePurchase(purchase)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -405,7 +474,8 @@ class StoreActivity : AppActivity() {
|
||||
}
|
||||
|
||||
private fun queryInAppProductDetails(
|
||||
coinsList: List<PaySettingsBean.Coins>
|
||||
coinsList: List<PaySettingsBean.Coins>,
|
||||
type: String
|
||||
) {
|
||||
val productDetailsResponseListener =
|
||||
ProductDetailsResponseListener { billingResult, productDetailsList ->
|
||||
@ -424,7 +494,11 @@ class StoreActivity : AppActivity() {
|
||||
}
|
||||
|
||||
mCoinAdapter?.recyclerView?.postDelayed({
|
||||
mCoinAdapter?.submitList(updatedCoinsList)
|
||||
if (type == "small") {
|
||||
mCoinAdapter?.submitList(updatedCoinsList)
|
||||
} else {
|
||||
mCoinBigAdapter?.submitList(updatedCoinsList)
|
||||
}
|
||||
}, 500)
|
||||
} else {
|
||||
hideDialog()
|
||||
@ -465,10 +539,10 @@ class StoreActivity : AppActivity() {
|
||||
}
|
||||
}
|
||||
}
|
||||
val productType: String = if (type == 0) {
|
||||
BillingClient.ProductType.INAPP
|
||||
} else {
|
||||
val productType: String = if (type == 1) {
|
||||
BillingClient.ProductType.SUBS
|
||||
} else {
|
||||
BillingClient.ProductType.INAPP
|
||||
}
|
||||
|
||||
val inAppProductInfo = ArrayList<QueryProductDetailsParams.Product>()
|
||||
@ -541,8 +615,10 @@ class StoreActivity : AppActivity() {
|
||||
order_code = it.order_code.toString()
|
||||
if (type == 0) {
|
||||
coinsData?.android_template_id?.let { it1 -> getProduct(it1) }
|
||||
} else {
|
||||
} else if (type == 1) {
|
||||
vipData?.android_template_id?.let { it1 -> getProduct(it1) }
|
||||
} else {
|
||||
coinsDataBig?.android_template_id?.let { it1 -> getProduct(it1) }
|
||||
}
|
||||
|
||||
} ?: run {
|
||||
@ -646,12 +722,12 @@ class StoreActivity : AppActivity() {
|
||||
ConsumeResponseListener { billingResult, purchaseToken ->
|
||||
val examplePayReq = PayBean(
|
||||
order_code,
|
||||
if (type == 0) coinsData?.id.toString() else vipData?.id.toString(),
|
||||
if (type == 0) coinsData?.id.toString() else coinsDataBig?.id.toString(),
|
||||
AppConfig.getPackageName(),
|
||||
if (type == 0) coinsData?.android_template_id.toString() else vipData?.android_template_id.toString(),
|
||||
if (type == 0) coinsData?.android_template_id.toString() else coinsDataBig?.android_template_id.toString(),
|
||||
purchaseToken,
|
||||
purchaseData?.orderId.toString(),
|
||||
if (type == 0) coinsData?.price.toString() else vipData?.price.toString()
|
||||
if (type == 0) coinsData?.price.toString() else coinsDataBig?.price.toString()
|
||||
)
|
||||
payReq = examplePayReq
|
||||
if (billingResult.responseCode == BillingClient.BillingResponseCode.OK) {
|
||||
@ -674,7 +750,6 @@ class StoreActivity : AppActivity() {
|
||||
override fun onHttpSuccess(result: HttpData<UserInfoRes>) {
|
||||
result.getData()?.let {
|
||||
MsMMKVUtils.saveUserInfo(it)
|
||||
setUI()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -91,6 +91,7 @@ open class VideoPlayActivity : AppActivity(), VideoPlayAdapter.PlayerDetailColle
|
||||
|
||||
private var first: Boolean = true
|
||||
private var play: Boolean = true
|
||||
private var isBuyDialog: Boolean = false
|
||||
private var qualityRefresh: Boolean = false
|
||||
private var needRefresh: Boolean = false
|
||||
private var needRestart: Boolean = false
|
||||
@ -99,6 +100,7 @@ open class VideoPlayActivity : AppActivity(), VideoPlayAdapter.PlayerDetailColle
|
||||
// private val exampleRecommendViewModel by lazy { ViewModelProvider(this)[ExampleRecommendViewModel::class.java] }
|
||||
private var currentPage = 1
|
||||
private val currentSize = 10
|
||||
private var notLockPosition = 0
|
||||
private var currentPosition = 0
|
||||
private var bannerPosition = 0
|
||||
private var recommendAdapter: VideoPlayAdapter? = null
|
||||
@ -338,6 +340,7 @@ open class VideoPlayActivity : AppActivity(), VideoPlayAdapter.PlayerDetailColle
|
||||
detailPlayerView()?.pause()
|
||||
}, 500)
|
||||
} else {
|
||||
notLockPosition = position + 1
|
||||
MsConstants.ExampleLock = false
|
||||
viewLock?.visibility = View.INVISIBLE
|
||||
createHistory(
|
||||
@ -412,8 +415,11 @@ open class VideoPlayActivity : AppActivity(), VideoPlayAdapter.PlayerDetailColle
|
||||
super.onResume()
|
||||
if (!play) {
|
||||
detailPlayerView()?.play()
|
||||
player?.play()
|
||||
} else {
|
||||
play = false
|
||||
if (!isBuyDialog) {
|
||||
play = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -433,7 +439,10 @@ open class VideoPlayActivity : AppActivity(), VideoPlayAdapter.PlayerDetailColle
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
MsConstants.ExampleIsCurrentPage = false
|
||||
srRecommend?.postDelayed({ detailPlayerView()?.pause() }, 300)
|
||||
srRecommend?.postDelayed({
|
||||
detailPlayerView()?.pause()
|
||||
player?.pause()
|
||||
}, 300)
|
||||
}
|
||||
|
||||
fun getVideoDetails(
|
||||
@ -746,6 +755,9 @@ open class VideoPlayActivity : AppActivity(), VideoPlayAdapter.PlayerDetailColle
|
||||
if (MsConstants.CONSTANTS_start_play == event) {
|
||||
viewLock?.postDelayed({ detailPlayerView()?.play() }, 500)
|
||||
}
|
||||
if (MsConstants.CONSTANTS_PAY_REFRESH_DISMISS == event) {
|
||||
isBuyDialog = false
|
||||
}
|
||||
}
|
||||
|
||||
override fun collection(episode: VideoDetailsApi.Bean.Episode) {
|
||||
@ -970,6 +982,7 @@ open class VideoPlayActivity : AppActivity(), VideoPlayAdapter.PlayerDetailColle
|
||||
supportFragmentManager,
|
||||
"ExampleRechargeDialogFragment"
|
||||
)
|
||||
isBuyDialog = true
|
||||
play = true
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
@ -1142,21 +1155,36 @@ open class VideoPlayActivity : AppActivity(), VideoPlayAdapter.PlayerDetailColle
|
||||
it.short_play_video_id
|
||||
)
|
||||
)
|
||||
val toJson = Gson().toJson(
|
||||
shortPlayId?.let { it1 ->
|
||||
HomeDataHistoryBean(
|
||||
shortVideo?.name.toString(),
|
||||
it1,
|
||||
it.episode.toString(),
|
||||
shortVideo?.image_url.toString()
|
||||
)
|
||||
}
|
||||
)
|
||||
MsMMKVUtils.getMMKV()
|
||||
.putString(MsConstants.Constants_Main_Video_info, toJson)
|
||||
MsMMKVUtils.getMMKV()
|
||||
.putBoolean(MsConstants.Constants_Main_Video_status, true)
|
||||
} else {
|
||||
val toJson = Gson().toJson(
|
||||
shortPlayId?.let { it1 ->
|
||||
HomeDataHistoryBean(
|
||||
shortVideo?.name.toString(),
|
||||
it1,
|
||||
notLockPosition.toString(),
|
||||
shortVideo?.image_url.toString()
|
||||
)
|
||||
}
|
||||
)
|
||||
MsMMKVUtils.getMMKV()
|
||||
.putString(MsConstants.Constants_Main_Video_info, toJson)
|
||||
MsMMKVUtils.getMMKV()
|
||||
.putBoolean(MsConstants.Constants_Main_Video_status, true)
|
||||
}
|
||||
val toJson = Gson().toJson(
|
||||
shortPlayId?.let { it1 ->
|
||||
HomeDataHistoryBean(
|
||||
shortVideo?.name.toString(),
|
||||
it1,
|
||||
it.episode.toString(),
|
||||
shortVideo?.image_url.toString()
|
||||
)
|
||||
}
|
||||
)
|
||||
MsMMKVUtils.getMMKV()
|
||||
.putString(MsConstants.Constants_Main_Video_info, toJson)
|
||||
MsMMKVUtils.getMMKV()
|
||||
.putBoolean(MsConstants.Constants_Main_Video_status, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import com.chad.library.adapter4.BaseQuickAdapter
|
||||
import com.localee.mireo.shortapp.databinding.ItemCoinBuyBinding
|
||||
import com.localee.mireo.app.http.bean.PaySettingsBean
|
||||
import com.localee.mireo.app.utils.TranslatesUtils
|
||||
import kotlin.math.floor
|
||||
|
||||
class MyCoinBuyAdapter : BaseQuickAdapter<PaySettingsBean.Coins, MyCoinBuyAdapter.VH>() {
|
||||
@ -29,6 +30,11 @@ class MyCoinBuyAdapter : BaseQuickAdapter<PaySettingsBean.Coins, MyCoinBuyAdapte
|
||||
if (null != item) {
|
||||
holder.binding.tvCoins.text = "+" + item.coins.toString()
|
||||
holder.binding.tvPrice.text = item.price_google
|
||||
if (item.send_coins > 0) {
|
||||
holder.binding.tvBonus.text = "+".plus(item.send_coins)
|
||||
} else {
|
||||
holder.binding.tvBonus.text = ""
|
||||
}
|
||||
if (item.corner_marker.isNotEmpty()) {
|
||||
holder.binding.tvHot.text = item.corner_marker
|
||||
holder.binding.tvHot.visibility = View.VISIBLE
|
||||
|
@ -0,0 +1,73 @@
|
||||
package com.localee.mireo.app.ui.adapter
|
||||
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.chad.library.adapter4.BaseQuickAdapter
|
||||
import com.localee.mireo.app.http.bean.PaySettingsBean
|
||||
import com.localee.mireo.shortapp.databinding.ItemCoinBuyBigBinding
|
||||
import kotlin.math.floor
|
||||
|
||||
class MyCoinBuyBigAdapter : BaseQuickAdapter<PaySettingsBean.Coins, MyCoinBuyBigAdapter.VH>() {
|
||||
|
||||
var currentPosition = -1
|
||||
|
||||
class VH(
|
||||
parent: ViewGroup,
|
||||
val binding: ItemCoinBuyBigBinding = ItemCoinBuyBigBinding.inflate(
|
||||
LayoutInflater.from(parent.context), parent, false
|
||||
),
|
||||
) : RecyclerView.ViewHolder(binding.root)
|
||||
|
||||
override fun onCreateViewHolder(context: Context, parent: ViewGroup, viewType: Int): VH {
|
||||
return VH(parent)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: VH, position: Int, item: PaySettingsBean.Coins?) {
|
||||
if (null != item) {
|
||||
holder.binding.tvCoins.text = "+" + item.coins.toString()
|
||||
holder.binding.tvPrice.text = item.price_google
|
||||
if (item.send_coins > 0) {
|
||||
holder.binding.tvBonus.text = "+".plus(item.send_coins)
|
||||
} else {
|
||||
holder.binding.tvBonus.text = ""
|
||||
}
|
||||
if (item.corner_marker.isNotEmpty()) {
|
||||
holder.binding.tvHot.visibility = View.VISIBLE
|
||||
} else {
|
||||
holder.binding.tvHot.visibility = View.INVISIBLE
|
||||
}
|
||||
holder.binding.tvPrice.shapeDrawableBuilder?.setSolidGradientColors(
|
||||
0xFFFFD280.toInt(),
|
||||
0xFFFF9333.toInt()
|
||||
)
|
||||
?.intoBackground()
|
||||
if (currentPosition == position) {
|
||||
holder.binding.root.shapeDrawableBuilder?.setStrokeColor(0xFFFFB06A.toInt())
|
||||
?.setStrokeSize(1)
|
||||
?.intoBackground()
|
||||
} else {
|
||||
holder.binding.root.shapeDrawableBuilder?.setStrokeColor(0x40FFFFFF.toInt())
|
||||
?.setStrokeSize(1)
|
||||
?.intoBackground()
|
||||
}
|
||||
val sendCoins = item?.send_coins?.toDouble()
|
||||
if (sendCoins != null) {
|
||||
if (sendCoins > 0) {
|
||||
val coins = item?.coins?.toDouble()
|
||||
val let = coins?.let { sendCoins?.div(it) }
|
||||
val times = let?.times(100)
|
||||
if (times != null) {
|
||||
val floor = floor(times).toInt()
|
||||
holder.binding.tvCorner.text = "+".plus(floor).plus("%")
|
||||
holder.binding.tvCorner.visibility = View.VISIBLE
|
||||
}
|
||||
} else {
|
||||
holder.binding.tvCorner.visibility = View.INVISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -32,30 +32,29 @@ class MyVipBuyAdapter : BaseQuickAdapter<PaySettingsBean.Vip, MyVipBuyAdapter.VH
|
||||
holder.binding.tvDay.text = item.brief
|
||||
holder.binding.tvMoney.text = item.price_google
|
||||
holder.binding.tvDes.text = item.description
|
||||
holder.binding.tvInfo.text = item.auto_sub
|
||||
if (item.corner_marker.isNotEmpty()) {
|
||||
holder.binding.tvHot.text = item.corner_marker
|
||||
holder.binding.tvHot.visibility = View.VISIBLE
|
||||
} else {
|
||||
holder.binding.tvHot.visibility = View.INVISIBLE
|
||||
}
|
||||
// if (item.corner_marker.isNotEmpty()) {
|
||||
// holder.binding.tvHot.text = item.corner_marker
|
||||
// holder.binding.tvHot.visibility = View.VISIBLE
|
||||
// } else {
|
||||
// holder.binding.tvHot.visibility = View.INVISIBLE
|
||||
// }
|
||||
|
||||
if ((item?.send_coins ?: 0) > 0) {
|
||||
holder.binding.tvExtra.text =
|
||||
"+ ".plus(TranslatesUtils.translates()?.mireo_extra).plus(" ")
|
||||
.plus(item?.send_coins)
|
||||
holder.binding.tvExpire.text =
|
||||
TranslatesUtils.translates()?.mireo_donate_expire?.let {
|
||||
TranslatesUtils.replace(
|
||||
it,
|
||||
item?.send_coin_ttl.toString()
|
||||
)
|
||||
}
|
||||
// holder.binding.tvExpire.text =
|
||||
// TranslatesUtils.translates()?.mireo_donate_expire?.let {
|
||||
// TranslatesUtils.replace(
|
||||
// it,
|
||||
// item?.send_coin_ttl.toString()
|
||||
// )
|
||||
// }
|
||||
holder.binding.llExtra.visibility = View.VISIBLE
|
||||
holder.binding.tvExpire.visibility = View.VISIBLE
|
||||
// holder.binding.tvExpire.visibility = View.VISIBLE
|
||||
} else {
|
||||
holder.binding.llExtra.visibility = View.GONE
|
||||
holder.binding.tvExpire.visibility = View.GONE
|
||||
// holder.binding.tvExpire.visibility = View.GONE
|
||||
}
|
||||
holder.binding.tvMoneyDay.text = "/".plus(item?.short_type)
|
||||
|
||||
@ -63,57 +62,65 @@ class MyVipBuyAdapter : BaseQuickAdapter<PaySettingsBean.Vip, MyVipBuyAdapter.VH
|
||||
when (item.vip_type_key) {
|
||||
"week" -> {
|
||||
holder.binding.clItem.setBackgroundResource(R.mipmap.ic_vip_week_bg)
|
||||
holder.binding.tvDay.setTextColor(Color.parseColor("#712B2B"))
|
||||
holder.binding.tvMoney.setTextColor(Color.parseColor("#712B2B"))
|
||||
holder.binding.tvDes.setTextColor(Color.parseColor("#712B2B"))
|
||||
holder.binding.tvDay.setTextColor(Color.parseColor("#2493A4"))
|
||||
holder.binding.tvMoney.setTextColor(Color.parseColor("#2493A4"))
|
||||
holder.binding.tvMoneyDay.setTextColor(Color.parseColor("#2493A4"))
|
||||
holder.binding.tvDes.setTextColor(Color.parseColor("#006574"))
|
||||
holder.binding.tvDes.shapeDrawableBuilder?.setSolidGradientColors(
|
||||
0xFFFFCDCB.toInt(),
|
||||
0xFFA3F3FF.toInt(),
|
||||
0x00000000
|
||||
)
|
||||
?.intoBackground()
|
||||
holder.binding.tvExpire.setTextColor(Color.parseColor("#6CADB7"))
|
||||
}
|
||||
|
||||
"month" -> {
|
||||
holder.binding.clItem.setBackgroundResource(R.mipmap.ic_vip_month_bg)
|
||||
holder.binding.tvDay.setTextColor(Color.parseColor("#714F00"))
|
||||
holder.binding.tvMoney.setTextColor(Color.parseColor("#714F00"))
|
||||
holder.binding.tvDes.setTextColor(Color.parseColor("#714F00"))
|
||||
holder.binding.tvDay.setTextColor(Color.parseColor("#712B2B"))
|
||||
holder.binding.tvMoney.setTextColor(Color.parseColor("#712B2B"))
|
||||
holder.binding.tvMoneyDay.setTextColor(Color.parseColor("#712B2B"))
|
||||
holder.binding.tvDes.setTextColor(Color.parseColor("#712B2B"))
|
||||
holder.binding.tvDes.shapeDrawableBuilder?.setSolidGradientColors(
|
||||
0xFFFFEAC9.toInt(),
|
||||
0xFFFFADAD.toInt(),
|
||||
0x00000000
|
||||
)
|
||||
?.intoBackground()
|
||||
holder.binding.tvExpire.setTextColor(Color.parseColor("#A66969"))
|
||||
}
|
||||
|
||||
"quarter" -> {
|
||||
holder.binding.clItem.setBackgroundResource(R.mipmap.ic_vip_quarter_bg)
|
||||
holder.binding.tvDay.setTextColor(Color.parseColor("#472B71"))
|
||||
holder.binding.tvMoney.setTextColor(Color.parseColor("#472B71"))
|
||||
holder.binding.tvDes.setTextColor(Color.parseColor("#472B71"))
|
||||
holder.binding.tvDay.setTextColor(Color.parseColor("#532C8D"))
|
||||
holder.binding.tvMoney.setTextColor(Color.parseColor("#532C8D"))
|
||||
holder.binding.tvMoneyDay.setTextColor(Color.parseColor("#532C8D"))
|
||||
holder.binding.tvDes.setTextColor(Color.parseColor("#532C8D"))
|
||||
holder.binding.tvDes.shapeDrawableBuilder?.setSolidGradientColors(
|
||||
0xFFE6D8FF.toInt(),
|
||||
0xFFD2B4FF.toInt(),
|
||||
0x00000000
|
||||
)
|
||||
?.intoBackground()
|
||||
holder.binding.tvExpire.setTextColor(Color.parseColor("#947ABA"))
|
||||
}
|
||||
|
||||
"year" -> {
|
||||
holder.binding.clItem.setBackgroundResource(R.mipmap.ic_vip_year_bg)
|
||||
holder.binding.tvDay.setTextColor(Color.parseColor("#006574"))
|
||||
holder.binding.tvMoney.setTextColor(Color.parseColor("#006574"))
|
||||
holder.binding.tvDes.setTextColor(Color.parseColor("#006574"))
|
||||
holder.binding.tvDay.setTextColor(Color.parseColor("#CF9100"))
|
||||
holder.binding.tvMoney.setTextColor(Color.parseColor("#CF9100"))
|
||||
holder.binding.tvMoneyDay.setTextColor(Color.parseColor("#CF9100"))
|
||||
holder.binding.tvDes.setTextColor(Color.parseColor("#714F00"))
|
||||
holder.binding.tvDes.shapeDrawableBuilder?.setSolidGradientColors(
|
||||
0xFFD5FAFF.toInt(),
|
||||
0xFFFFDA84.toInt(),
|
||||
0x00000000
|
||||
)
|
||||
?.intoBackground()
|
||||
holder.binding.tvExpire.setTextColor(Color.parseColor("#B8984F"))
|
||||
}
|
||||
}
|
||||
|
||||
if (currentPosition == position) {
|
||||
holder.binding.checkbox.isChecked = true
|
||||
holder.binding.checkbox.visibility = View.VISIBLE
|
||||
} else {
|
||||
holder.binding.checkbox.isChecked = false
|
||||
holder.binding.checkbox.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -287,7 +287,8 @@ class MineFragment : TitleBarFragment<HomeActivity>(), OnRefreshLoadMoreListener
|
||||
}
|
||||
|
||||
R.id.ll_vip -> {
|
||||
startActivity(MyVipActivity::class.java)
|
||||
// startActivity(MyVipActivity::class.java)
|
||||
startActivity(StoreActivity::class.java)
|
||||
}
|
||||
|
||||
R.id.ll_store -> {
|
||||
@ -359,7 +360,8 @@ class MineFragment : TitleBarFragment<HomeActivity>(), OnRefreshLoadMoreListener
|
||||
MsConstants.CONSTANTS_PREF_LAST_POPUP_TIME_VIP,
|
||||
System.currentTimeMillis()
|
||||
)
|
||||
startActivity(MyVipActivity::class.java)
|
||||
startActivity(StoreActivity::class.java)
|
||||
// startActivity(MyVipActivity::class.java)
|
||||
vipSplashDialog?.dismiss()
|
||||
isVipSplash = false
|
||||
System.gc()
|
||||
|
@ -3,6 +3,7 @@ package com.localee.mireo.app.ui.fragment
|
||||
import android.app.AlertDialog
|
||||
import android.app.Dialog
|
||||
import android.content.DialogInterface
|
||||
import android.graphics.Rect
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.text.Html
|
||||
@ -10,7 +11,9 @@ import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.android.billingclient.api.AcknowledgePurchaseParams
|
||||
import com.android.billingclient.api.BillingClient
|
||||
import com.android.billingclient.api.BillingClientStateListener
|
||||
@ -44,6 +47,7 @@ import com.localee.mireo.app.http.model.HttpData
|
||||
import com.localee.mireo.app.other.AppConfig
|
||||
import com.localee.mireo.app.other.MsConstants
|
||||
import com.localee.mireo.app.ui.adapter.MyCoinBuyAdapter
|
||||
import com.localee.mireo.app.ui.adapter.MyCoinBuyBigAdapter
|
||||
import com.localee.mireo.app.ui.adapter.MyVipBuyAdapter
|
||||
import com.localee.mireo.app.utils.DHStringUtils.getPublicRequest
|
||||
import com.localee.mireo.app.utils.MsMMKVUtils
|
||||
@ -64,14 +68,17 @@ class RechargeDialogFragment : BottomSheetDialogFragment(), OnHttpListener<Any>
|
||||
private var short_play_id: Int? = 0
|
||||
private var mAdapter: MyVipBuyAdapter? = null
|
||||
private var mCoinAdapter: MyCoinBuyAdapter? = null
|
||||
private var mCoinBigAdapter: MyCoinBuyBigAdapter? = null
|
||||
|
||||
private var order_code = ""
|
||||
private var vipData: PaySettingsBean.Vip? = null
|
||||
private var coinsData: PaySettingsBean.Coins? = null
|
||||
private var coinsDataBig: PaySettingsBean.Coins? = null
|
||||
private var billingClient: BillingClient? = null
|
||||
private var purchaseData: Purchase? = null
|
||||
private var payReq: PayBean? = null
|
||||
private var detainmentData: PaySettingsBean.Coins? = null
|
||||
private var parcelable: VideoDetailsApi.Bean.Episode? = null
|
||||
|
||||
interface OnDataPass {
|
||||
fun onDataPass(data: PaySettingsBean.Coins?)
|
||||
@ -85,108 +92,127 @@ class RechargeDialogFragment : BottomSheetDialogFragment(), OnHttpListener<Any>
|
||||
val inflater = requireActivity().layoutInflater
|
||||
val view = inflater.inflate(R.layout.dialog_recharge_fragment, null)
|
||||
dialogRechargeFragmentBinding = DialogRechargeFragmentBinding.bind(view)
|
||||
val parcelable =
|
||||
arguments?.getParcelable<VideoDetailsApi.Bean.Episode>(MsConstants.CONSTANTS_Episode)
|
||||
parcelable =
|
||||
arguments?.getParcelable(MsConstants.CONSTANTS_Episode)
|
||||
short_play_id = parcelable?.short_play_id
|
||||
promise_view_ad = parcelable?.promise_view_ad
|
||||
|
||||
dialogRechargeFragmentBinding?.tvCoins?.text = MsMMKVUtils.getAllCoin().toString()
|
||||
dialogRechargeFragmentBinding?.tvUnlock?.text = parcelable?.coins.toString()
|
||||
dialogRechargeFragmentBinding?.ivLoading?.let {
|
||||
Glide.with(requireContext())
|
||||
.asGif()
|
||||
.load(R.mipmap.iv_loading)
|
||||
.into(it)
|
||||
}
|
||||
dialogRechargeFragmentBinding?.recyclerCoin?.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
dialogRechargeFragmentBinding?.recyclerView?.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
|
||||
mCoinAdapter = MyCoinBuyAdapter()
|
||||
dialogRechargeFragmentBinding?.recyclerCoin?.adapter = mCoinAdapter
|
||||
|
||||
mAdapter = MyVipBuyAdapter()
|
||||
dialogRechargeFragmentBinding?.recyclerView?.adapter = mAdapter
|
||||
dialogRechargeFragmentBinding?.ivClose?.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
if (TranslatesUtils.translates() != null) {
|
||||
dialogRechargeFragmentBinding?.tvCoinsText?.text = TranslatesUtils.translates()?.mireo_store_coins
|
||||
dialogRechargeFragmentBinding?.tvCoinRecharge?.text = TranslatesUtils.translates()?.mireo_coin_recharege
|
||||
dialogRechargeFragmentBinding?.tvMembership?.text = TranslatesUtils.translates()?.mireo_store_recharge
|
||||
dialogRechargeFragmentBinding?.tvBuy?.text = TranslatesUtils.translates()?.mireo_buy_now
|
||||
dialogRechargeFragmentBinding?.tvCoinsText?.text =
|
||||
TranslatesUtils.translates()?.mireo_store_coins
|
||||
dialogRechargeFragmentBinding?.tvTitle?.text = TranslatesUtils.translates()?.mireo_coin_recharege
|
||||
dialogRechargeFragmentBinding?.tvTitleVip?.text = TranslatesUtils.translates()?.mrieo_store_vip_title
|
||||
dialogRechargeFragmentBinding?.tvUnlockText?.text = TranslatesUtils.translates()?.mireo_unlock
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
dialogRechargeFragmentBinding?.tvHint?.text = Html.fromHtml(
|
||||
TranslatesUtils.translates()?.mireo_pay_hint ?: getString(R.string.store_tips),
|
||||
Html.FROM_HTML_MODE_COMPACT
|
||||
)
|
||||
}else{
|
||||
} else {
|
||||
dialogRechargeFragmentBinding?.tvHint?.text = Html.fromHtml(
|
||||
TranslatesUtils.translates()?.mireo_pay_hint ?: getString(R.string.store_tips)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
mCoinAdapter?.setOnItemClickListener { adapter, view, position ->
|
||||
if (type == 1) {
|
||||
mAdapter?.currentPosition = -1
|
||||
mAdapter?.notifyDataSetChanged()
|
||||
dialogRechargeFragmentBinding?.recyclerCoin?.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
dialogRechargeFragmentBinding?.recyclerCoin?.layoutManager =
|
||||
GridLayoutManager(requireContext(), 3)
|
||||
dialogRechargeFragmentBinding?.recyclerCoin?.addItemDecoration(object :
|
||||
RecyclerView.ItemDecoration() {
|
||||
override fun getItemOffsets(
|
||||
outRect: Rect,
|
||||
view: View,
|
||||
parent: RecyclerView,
|
||||
state: RecyclerView.State
|
||||
) {
|
||||
outRect.left = resources.getDimension(R.dimen.dp_5).toInt()
|
||||
outRect.right = resources.getDimension(R.dimen.dp_5).toInt()
|
||||
outRect.bottom = resources.getDimension(R.dimen.dp_10).toInt()
|
||||
}
|
||||
type = 0
|
||||
mCoinAdapter?.currentPosition = position
|
||||
mCoinAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
})
|
||||
dialogRechargeFragmentBinding?.recyclerCoinBig?.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
dialogRechargeFragmentBinding?.recyclerCoinBig?.layoutManager =
|
||||
GridLayoutManager(requireContext(), 2)
|
||||
dialogRechargeFragmentBinding?.recyclerCoinBig?.addItemDecoration(object :
|
||||
RecyclerView.ItemDecoration() {
|
||||
override fun getItemOffsets(
|
||||
outRect: Rect,
|
||||
view: View,
|
||||
parent: RecyclerView,
|
||||
state: RecyclerView.State
|
||||
) {
|
||||
outRect.left = resources.getDimension(R.dimen.dp_5).toInt()
|
||||
outRect.right = resources.getDimension(R.dimen.dp_5).toInt()
|
||||
outRect.bottom = resources.getDimension(R.dimen.dp_10).toInt()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
mCoinAdapter = MyCoinBuyAdapter()
|
||||
dialogRechargeFragmentBinding?.recyclerCoin?.adapter = mCoinAdapter
|
||||
|
||||
dialogRechargeFragmentBinding?.recyclerView?.layoutManager =
|
||||
LinearLayoutManager(requireContext())
|
||||
mAdapter = MyVipBuyAdapter()
|
||||
dialogRechargeFragmentBinding?.recyclerView?.adapter = mAdapter
|
||||
mCoinBigAdapter = MyCoinBuyBigAdapter()
|
||||
|
||||
dialogRechargeFragmentBinding?.recyclerCoinBig?.adapter = mCoinBigAdapter
|
||||
|
||||
mAdapter?.setOnItemClickListener { adapter, view, position ->
|
||||
if (type == 0) {
|
||||
if (type != 1) {
|
||||
mCoinAdapter?.currentPosition = -1
|
||||
mCoinAdapter?.notifyDataSetChanged()
|
||||
mCoinBigAdapter?.currentPosition = -1
|
||||
mCoinBigAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
type = 1
|
||||
mAdapter?.currentPosition = position
|
||||
mAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
dialogRechargeFragmentBinding?.tvBuy?.setOnClickListener {
|
||||
if (mAdapter?.currentPosition == -1 && mCoinAdapter?.currentPosition == -1) {
|
||||
if (TranslatesUtils.translates() != null) {
|
||||
ToastUtils.show(TranslatesUtils.translates()?.mireo_select_a_payment_item.toString())
|
||||
} else {
|
||||
ToastUtils.show(getString(R.string.select_a_payment_item))
|
||||
}
|
||||
return@setOnClickListener
|
||||
}
|
||||
singleClick {
|
||||
if (!isConnect) {
|
||||
if (TranslatesUtils.translates() != null) {
|
||||
ToastUtils.show(TranslatesUtils.translates()?.mireo_g_pay_error.toString())
|
||||
} else {
|
||||
ToastUtils.show(getString(R.string.google_pay_error))
|
||||
}
|
||||
return@singleClick
|
||||
}
|
||||
dialogRechargeFragmentBinding?.ivLoading?.visibility = View.VISIBLE
|
||||
if (type == 0) {
|
||||
coinsData =
|
||||
mCoinAdapter!!.getItem(mCoinAdapter!!.currentPosition) as PaySettingsBean.Coins
|
||||
} else {
|
||||
vipData = mAdapter!!.getItem(mAdapter!!.currentPosition) as PaySettingsBean.Vip
|
||||
}
|
||||
if (parcelable != null) {
|
||||
short_play_id?.let { it1 ->
|
||||
CreateOrderReqBean(
|
||||
if (type == 0) coinsData?.id.toString() else vipData?.id.toString(),
|
||||
"google",
|
||||
it1,
|
||||
parcelable.short_play_video_id
|
||||
)
|
||||
}?.let { it2 ->
|
||||
getCreateOrder(
|
||||
it2
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setOnPayNowClick()
|
||||
}
|
||||
mCoinAdapter?.setOnItemClickListener { adapter, view, position ->
|
||||
if (type != 0) {
|
||||
mAdapter?.currentPosition = -1
|
||||
mAdapter?.notifyDataSetChanged()
|
||||
mCoinBigAdapter?.currentPosition = -1
|
||||
mCoinBigAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
type = 0
|
||||
mCoinAdapter?.currentPosition = position
|
||||
mCoinAdapter?.notifyDataSetChanged()
|
||||
|
||||
setOnPayNowClick()
|
||||
}
|
||||
mCoinBigAdapter?.setOnItemClickListener { adapter, view, position ->
|
||||
if (type != 2) {
|
||||
mAdapter?.currentPosition = -1
|
||||
mAdapter?.notifyDataSetChanged()
|
||||
mCoinAdapter?.currentPosition = -1
|
||||
mCoinAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
type = 2
|
||||
mCoinBigAdapter?.currentPosition = position
|
||||
mCoinBigAdapter?.notifyDataSetChanged()
|
||||
|
||||
setOnPayNowClick()
|
||||
}
|
||||
|
||||
getPaySettings(parcelable?.short_play_id, parcelable?.short_play_video_id)
|
||||
initPay()
|
||||
@ -199,11 +225,60 @@ class RechargeDialogFragment : BottomSheetDialogFragment(), OnHttpListener<Any>
|
||||
window?.setGravity(Gravity.BOTTOM)
|
||||
val layoutParams = window?.attributes
|
||||
layoutParams?.width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
layoutParams?.height = resources.getDimensionPixelSize(R.dimen.dp_500)
|
||||
layoutParams?.height =
|
||||
(requireActivity().resources.displayMetrics.heightPixels - requireActivity().resources.getDimension(
|
||||
R.dimen.dp_90
|
||||
)).toInt()
|
||||
window?.attributes = layoutParams
|
||||
return dialog
|
||||
}
|
||||
|
||||
fun setOnPayNowClick() {
|
||||
singleClick {
|
||||
if (!isConnect) {
|
||||
if (TranslatesUtils.translates() != null) {
|
||||
ToastUtils.show(TranslatesUtils.translates()?.mireo_g_pay_error.toString())
|
||||
} else {
|
||||
ToastUtils.show(getString(R.string.google_pay_error))
|
||||
}
|
||||
return@singleClick
|
||||
}
|
||||
if (type == 0) {
|
||||
coinsData =
|
||||
mCoinAdapter?.getItem(mCoinAdapter!!.currentPosition) as PaySettingsBean.Coins
|
||||
} else if (type == 1) {
|
||||
vipData =
|
||||
mAdapter?.getItem(mAdapter!!.currentPosition) as PaySettingsBean.Vip
|
||||
} else {
|
||||
coinsDataBig =
|
||||
mCoinBigAdapter?.getItem(mCoinBigAdapter!!.currentPosition) as PaySettingsBean.Coins
|
||||
}
|
||||
var idStr = ""
|
||||
if (type == 0) {
|
||||
idStr = coinsData?.id.toString()
|
||||
} else if (type == 1) {
|
||||
idStr = vipData?.id.toString()
|
||||
} else {
|
||||
idStr = coinsDataBig?.id.toString()
|
||||
}
|
||||
if (parcelable != null) {
|
||||
short_play_id?.let { it1 ->
|
||||
CreateOrderReqBean(
|
||||
idStr,
|
||||
"google",
|
||||
it1,
|
||||
parcelable!!.short_play_video_id
|
||||
)
|
||||
}?.let { it2 ->
|
||||
getCreateOrder(
|
||||
it2
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun getPaySettings(shortPlayId: Int?, videoId: Int?) {
|
||||
EasyHttp.get(this)
|
||||
.api(PaySettingsApi().apply {
|
||||
@ -213,12 +288,47 @@ class RechargeDialogFragment : BottomSheetDialogFragment(), OnHttpListener<Any>
|
||||
.request(object : HttpCallbackProxy<HttpData<PaySettingsBean>>(this) {
|
||||
override fun onHttpSuccess(result: HttpData<PaySettingsBean>) {
|
||||
result.getData()?.let {
|
||||
mCoinAdapter?.submitList(it.list_coins)
|
||||
mAdapter?.submitList(it.list_sub_vip)
|
||||
if (it.list_sub_vip.isNotEmpty()) {
|
||||
mAdapter?.submitList(it.list_sub_vip)
|
||||
dialogRechargeFragmentBinding?.recyclerView?.visibility = View.VISIBLE
|
||||
dialogRechargeFragmentBinding?.tvTitleVip?.visibility = View.VISIBLE
|
||||
|
||||
it.list_sub_vip?.let { it1 -> querySubProductDetails(it1) }
|
||||
it.list_coins?.let { it1 -> queryInAppProductDetails(it1) }
|
||||
it.list_sub_vip.let { it1 -> querySubProductDetails(it1) }
|
||||
|
||||
} else {
|
||||
dialogRechargeFragmentBinding?.recyclerView?.visibility = View.GONE
|
||||
dialogRechargeFragmentBinding?.tvTitleVip?.visibility = View.GONE
|
||||
}
|
||||
if (it.list_coins.isNotEmpty()) {
|
||||
val small = it.list_coins.filter { coins -> coins.size == "small" }
|
||||
val big = it.list_coins.filter { coins -> coins.size == "big" }
|
||||
if (small.isNotEmpty()) {
|
||||
mCoinAdapter?.submitList(small)
|
||||
dialogRechargeFragmentBinding?.recyclerCoin?.visibility =
|
||||
View.VISIBLE
|
||||
} else {
|
||||
dialogRechargeFragmentBinding?.recyclerCoin?.visibility = View.GONE
|
||||
}
|
||||
if (big.isNotEmpty()) {
|
||||
mCoinBigAdapter?.submitList(big)
|
||||
dialogRechargeFragmentBinding?.recyclerCoinBig?.visibility =
|
||||
View.VISIBLE
|
||||
} else {
|
||||
dialogRechargeFragmentBinding?.recyclerCoinBig?.visibility =
|
||||
View.GONE
|
||||
}
|
||||
if (small?.isNotEmpty() == true) {
|
||||
small?.let { it1 -> queryInAppProductDetails(it1, "small") }
|
||||
}
|
||||
if (big?.isNotEmpty() == true) {
|
||||
big?.let { it1 -> queryInAppProductDetails(it1, "big") }
|
||||
}
|
||||
dialogRechargeFragmentBinding?.tvTitle?.visibility = View.VISIBLE
|
||||
} else {
|
||||
dialogRechargeFragmentBinding?.recyclerCoin?.visibility = View.GONE
|
||||
dialogRechargeFragmentBinding?.recyclerCoinBig?.visibility = View.GONE
|
||||
dialogRechargeFragmentBinding?.tvTitle?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -232,10 +342,10 @@ class RechargeDialogFragment : BottomSheetDialogFragment(), OnHttpListener<Any>
|
||||
BillingClient.BillingResponseCode.OK -> {
|
||||
for (purchase in purchases!!) {
|
||||
if (purchase.purchaseState == Purchase.PurchaseState.PURCHASED) {
|
||||
if (type == 0) {
|
||||
consumePurchase(purchase)
|
||||
} else {
|
||||
if (type == 1) {
|
||||
consumePurchaseSub(purchase)
|
||||
} else {
|
||||
consumePurchase(purchase)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -314,10 +424,10 @@ class RechargeDialogFragment : BottomSheetDialogFragment(), OnHttpListener<Any>
|
||||
}
|
||||
}
|
||||
|
||||
val productType: String = if (type == 0) {
|
||||
BillingClient.ProductType.INAPP
|
||||
} else {
|
||||
val productType: String = if (type == 1) {
|
||||
BillingClient.ProductType.SUBS
|
||||
} else {
|
||||
BillingClient.ProductType.INAPP
|
||||
}
|
||||
val inAppProductInfo = ArrayList<QueryProductDetailsParams.Product>()
|
||||
inAppProductInfo.add(
|
||||
@ -380,7 +490,8 @@ class RechargeDialogFragment : BottomSheetDialogFragment(), OnHttpListener<Any>
|
||||
}
|
||||
|
||||
private fun queryInAppProductDetails(
|
||||
coinsList: List<PaySettingsBean.Coins>
|
||||
coinsList: List<PaySettingsBean.Coins>,
|
||||
type: String
|
||||
) {
|
||||
val productDetailsResponseListener =
|
||||
ProductDetailsResponseListener { billingResult, productDetailsList ->
|
||||
@ -399,7 +510,11 @@ class RechargeDialogFragment : BottomSheetDialogFragment(), OnHttpListener<Any>
|
||||
}
|
||||
|
||||
mCoinAdapter?.recyclerView?.postDelayed({
|
||||
mCoinAdapter?.submitList(updatedCoinsList)
|
||||
if (type == "small") {
|
||||
mCoinAdapter?.submitList(updatedCoinsList)
|
||||
} else {
|
||||
mCoinBigAdapter?.submitList(updatedCoinsList)
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
@ -560,8 +675,10 @@ class RechargeDialogFragment : BottomSheetDialogFragment(), OnHttpListener<Any>
|
||||
order_code = it.order_code.toString()
|
||||
if (type == 0) {
|
||||
coinsData?.android_template_id?.let { it1 -> getProduct(it1) }
|
||||
} else {
|
||||
} else if (type == 1) {
|
||||
vipData?.android_template_id?.let { it1 -> getProduct(it1) }
|
||||
} else {
|
||||
coinsDataBig?.android_template_id?.let { it1 -> getProduct(it1) }
|
||||
}
|
||||
|
||||
} ?: run {
|
||||
@ -639,10 +756,9 @@ class RechargeDialogFragment : BottomSheetDialogFragment(), OnHttpListener<Any>
|
||||
payReq = null
|
||||
dataPasser?.onDataPass(detainmentData)
|
||||
System.gc()
|
||||
EventBus.getDefault()
|
||||
.post(MsConstants.CONSTANTS_PAY_REFRESH_DISMISS)
|
||||
super.onDismiss(dialog)
|
||||
// if (!isPay) {
|
||||
// EventBus.getDefault().post(Constants_close_recharge)
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
@ -13,7 +13,7 @@ object MsMMKVUtils {
|
||||
|
||||
fun getMMKV(): MMKV {
|
||||
if (mmkv == null) {
|
||||
mmkv = MMKV.defaultMMKV()
|
||||
mmkv = MMKV.mmkvWithID("mireotv")
|
||||
}
|
||||
return mmkv!!
|
||||
}
|
||||
|
10
app/src/main/res/drawable/bg_store_unlock.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:endColor="#80F24C92" android:startColor="#80F8726D" android:type="linear" />
|
||||
<corners android:radius="@dimen/dp_20"
|
||||
/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -5,20 +5,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/example_color_121418">
|
||||
|
||||
<com.hjq.shape.view.ShapeTextView
|
||||
android:id="@+id/tv_buy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginVertical="@dimen/dp_15"
|
||||
android:gravity="center"
|
||||
android:text="Buy Now"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:shape_radius="@dimen/dp_25"
|
||||
app:shape_solidGradientEndColor="#F24C92"
|
||||
app:shape_solidGradientStartColor="#F8726D" />
|
||||
|
||||
<com.hjq.bar.TitleBar
|
||||
android:id="@+id/title"
|
||||
@ -37,224 +23,64 @@
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/tv_buy"
|
||||
android:layout_below="@+id/title">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_top_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_store_top_bg"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.hjq.shape.view.ShapeImageView
|
||||
android:id="@+id/iv_v"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
android:src="@mipmap/ic_store_v"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_top_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/tv_title_vip"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:text="Vip Recharge Discount"
|
||||
android:textColor="#E5BCA7"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_v"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_v" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_vip_expires"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="Limited-time offer!"
|
||||
android:textColor="#919191"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_v"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_right_coin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:src="@mipmap/ic_store_right_coin"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_v" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_coins_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:text="Your Coins: "
|
||||
android:text="VIP | Auto renew, cancel anytime"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_right_coin"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_right_coin" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_coins"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:text="0"
|
||||
android:textColor="@color/example_color_F56490"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_right_coin"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_coins_text"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_right_coin" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_coin_recharge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:drawableStart="@mipmap/ic_vip_member"
|
||||
android:drawableEnd="@mipmap/ic_vip_member"
|
||||
android:drawablePadding="@dimen/dp_20"
|
||||
android:text="COIN RECHARGE"
|
||||
android:textColor="#FCACB8"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_right_coin" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_coin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_coin_recharge" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_member_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:drawableStart="@mipmap/ic_vip_member"
|
||||
android:drawableEnd="@mipmap/ic_vip_member"
|
||||
android:drawablePadding="@dimen/dp_20"
|
||||
android:text="MEMBER BENEFITS"
|
||||
android:textColor="#FCACB8"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/recycler_coin" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_member_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:drawableTop="@mipmap/ic_vip_no_ads"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxLines="2"
|
||||
android:text="Ad-Free Streaming"
|
||||
android:textColor="#c4c4c4"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_member_2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_member_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_member_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:drawableTop="@mipmap/ic_vip_free"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxLines="2"
|
||||
android:text="Exclusive Episodes"
|
||||
android:textColor="#c4c4c4"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_member_3"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_member_1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_member_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_member_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:drawableTop="@mipmap/ic_vip_exclusive"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxLines="2"
|
||||
android:text="Daily free coins"
|
||||
android:textColor="#c4c4c4"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_member_4"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_member_2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_member_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_member_4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:drawableTop="@mipmap/ic_vip_only_coupons"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxLines="2"
|
||||
android:text="VIP-Only Coupons"
|
||||
android:textColor="#c4c4c4"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_member_3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_member_title" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_membership"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:drawableStart="@mipmap/ic_vip_member"
|
||||
android:drawableEnd="@mipmap/ic_vip_member"
|
||||
android:drawablePadding="@dimen/dp_20"
|
||||
android:text="MEMBERSHIP RECHARGE"
|
||||
android:textColor="#FCACB8"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_member_1" />
|
||||
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_membership" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title_vip" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:text="Coin Recharge"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/recyclerView"/>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_coin_big"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_coin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/recycler_coin_big" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hint"
|
||||
@ -268,7 +94,7 @@
|
||||
android:textColor="#9D9D9D"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/recyclerView" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/recycler_coin" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -3,119 +3,133 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
app:shape_radiusInTopLeft="@dimen/dp_12"
|
||||
app:shape_radiusInTopRight="@dimen/dp_12"
|
||||
app:shape_solidColor="#0F1013">
|
||||
|
||||
<com.hjq.shape.view.ShapeTextView
|
||||
android:id="@+id/tv_buy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:gravity="center"
|
||||
android:text="Buy Now"
|
||||
<TextView
|
||||
android:id="@+id/tv_coins_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:text="Your Coins: "
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:layout_alignParentBottom="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_right_coin"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:shape_radius="@dimen/dp_25"
|
||||
app:shape_solidGradientEndColor="#F24C92"
|
||||
app:shape_solidGradientStartColor="#F8726D" />
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_right_coin" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_coins"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/tv_coins_text"
|
||||
android:layout_toRightOf="@+id/tv_coins_text"
|
||||
android:text="0"
|
||||
android:textColor="@color/example_color_F56490"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_right_coin"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_coins_text"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_right_coin" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_17"
|
||||
android:layout_toRightOf="@+id/tv_coins"
|
||||
android:background="@drawable/bg_store_unlock"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="@dimen/dp_12">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_unlock_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Unlock: "
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_unlock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableEnd="@mipmap/ic_login_conins"
|
||||
android:drawablePadding="@dimen/dp_3"
|
||||
android:text="0"
|
||||
android:textColor="@color/example_color_F56490" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:src="@mipmap/ic_dialog_close_style_2" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:layout_above="@+id/tv_buy"
|
||||
>
|
||||
android:layout_below="@+id/tv_coins_text"
|
||||
android:layout_marginTop="@dimen/dp_15">
|
||||
|
||||
<com.hjq.shape.layout.ShapeConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_right_coin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:src="@mipmap/ic_store_right_coin"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_coins_text"
|
||||
android:id="@+id/tv_title_vip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:text="Your Coins: "
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_right_coin"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_right_coin" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_coins"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:text="0"
|
||||
android:textColor="@color/example_color_F56490"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_right_coin"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_coins_text"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_right_coin" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_coin_recharge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:drawableStart="@mipmap/ic_vip_member"
|
||||
android:drawableEnd="@mipmap/ic_vip_member"
|
||||
android:drawablePadding="@dimen/dp_20"
|
||||
android:text="COIN RECHARGE"
|
||||
android:textColor="#FCACB8"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_right_coin" />
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_coin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:text="VIP | Auto renew, cancel anytime"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_coin_recharge" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_membership"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:drawableStart="@mipmap/ic_vip_member"
|
||||
android:drawableEnd="@mipmap/ic_vip_member"
|
||||
android:drawablePadding="@dimen/dp_20"
|
||||
android:text="MEMBERSHIP RECHARGE"
|
||||
android:textColor="#FCACB8"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/recycler_coin" />
|
||||
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_membership"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title_vip" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:text="Coin Recharge"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/recyclerView" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_coin_big"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_coin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/recycler_coin_big" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hint"
|
||||
@ -124,12 +138,12 @@
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginVertical="@dimen/dp_12"
|
||||
android:lineSpacingExtra="@dimen/dp_2"
|
||||
android:paddingBottom="@dimen/dp_15"
|
||||
android:text="@string/store_tips"
|
||||
android:textColor="#9D9D9D"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/recyclerView" />
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@+id/recycler_coin" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_loading"
|
||||
|
@ -2,20 +2,19 @@
|
||||
<com.hjq.shape.layout.ShapeConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/ll_item"
|
||||
android:layout_width="@dimen/dp_105"
|
||||
android:layout_height="@dimen/dp_107"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_108"
|
||||
android:orientation="vertical"
|
||||
app:shape_radius="@dimen/dp_12"
|
||||
app:shape_solidColor="#1A191C"
|
||||
app:shape_strokeColor="@color/example_color_F56490"
|
||||
app:shape_radius="@dimen/dp_8"
|
||||
app:shape_solidColor="#413B40"
|
||||
app:shape_strokeColor="@color/white25"
|
||||
app:shape_strokeSize="0dp">
|
||||
|
||||
<com.hjq.shape.view.ShapeTextView
|
||||
android:id="@+id/tv_hot"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/dp_2"
|
||||
android:paddingHorizontal="@dimen/dp_4"
|
||||
android:paddingVertical="@dimen/dp_2"
|
||||
android:text=""
|
||||
android:textColor="@color/white"
|
||||
@ -23,15 +22,15 @@
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:shape_radiusInBottomRight="@dimen/dp_12"
|
||||
app:shape_radiusInTopLeft="@dimen/dp_12"
|
||||
app:shape_radiusInBottomRight="@dimen/dp_8"
|
||||
app:shape_radiusInTopLeft="@dimen/dp_8"
|
||||
app:shape_solidColor="@color/example_color_F56490" />
|
||||
|
||||
<com.hjq.shape.view.ShapeTextView
|
||||
android:id="@+id/tv_corner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/dp_2"
|
||||
android:paddingHorizontal="@dimen/dp_4"
|
||||
android:paddingVertical="@dimen/dp_2"
|
||||
android:text=""
|
||||
android:textColor="@color/white"
|
||||
@ -39,9 +38,9 @@
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:shape_radiusInBottomLeft="@dimen/dp_12"
|
||||
app:shape_radiusInTopRight="@dimen/dp_12"
|
||||
app:shape_solidColor="#EB8A64" />
|
||||
app:shape_radiusInBottomLeft="@dimen/dp_8"
|
||||
app:shape_radiusInTopRight="@dimen/dp_8"
|
||||
app:shape_solidColor="@color/example_color_F56490" />
|
||||
|
||||
|
||||
<TextView
|
||||
@ -49,20 +48,26 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="+500"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:drawableEnd="@mipmap/ic_me_conins"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_hot" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_21"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
<TextView
|
||||
android:id="@+id/tv_bonus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:src="@mipmap/ic_me_conins"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:paddingHorizontal="@dimen/dp_10"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@color/example_color_F56490"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_coins" />
|
||||
@ -80,10 +85,10 @@
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:shape_radiusInBottomLeft="@dimen/dp_12"
|
||||
app:shape_radiusInBottomRight="@dimen/dp_12"
|
||||
app:shape_solidGradientEndColor="#353739"
|
||||
app:shape_solidGradientOrientation="topToBottom"
|
||||
app:shape_solidGradientStartColor="#353739" />
|
||||
app:shape_radiusInBottomLeft="@dimen/dp_8"
|
||||
app:shape_radiusInBottomRight="@dimen/dp_8"
|
||||
app:shape_solidGradientEndColor="#F24C92"
|
||||
app:shape_solidGradientOrientation="startToEnd"
|
||||
app:shape_solidGradientStartColor="#F8726D" />
|
||||
|
||||
</com.hjq.shape.layout.ShapeConstraintLayout>
|
93
app/src/main/res/layout/item_coin_buy_big.xml
Normal file
@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.hjq.shape.layout.ShapeConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/ll_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_108"
|
||||
android:orientation="vertical"
|
||||
app:shape_radius="@dimen/dp_8"
|
||||
app:shape_solidColor="#4B4331"
|
||||
app:shape_strokeColor="@color/white25"
|
||||
app:shape_strokeSize="@dimen/dp_1">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/tv_hot"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:src="@mipmap/iv_store_coin_big_hot"
|
||||
android:text=""
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<com.hjq.shape.view.ShapeTextView
|
||||
android:id="@+id/tv_corner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/dp_4"
|
||||
android:paddingVertical="@dimen/dp_2"
|
||||
android:text=""
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:shape_radiusInBottomLeft="@dimen/dp_8"
|
||||
app:shape_radiusInTopRight="@dimen/dp_8"
|
||||
app:shape_solidColor="#E5FF8C27" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_coins"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:drawableEnd="@mipmap/ic_me_conins"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="+500"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_20"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bonus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:textColor="#FFE4BE"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="@dimen/dp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_coins" />
|
||||
|
||||
|
||||
<com.hjq.shape.view.ShapeTextView
|
||||
android:id="@+id/tv_price"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:paddingVertical="@dimen/dp_3"
|
||||
android:text="50% Off"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:shape_radiusInBottomLeft="@dimen/dp_8"
|
||||
app:shape_radiusInBottomRight="@dimen/dp_8"
|
||||
app:shape_solidGradientEndColor="#FF9333"
|
||||
app:shape_solidGradientOrientation="startToEnd"
|
||||
app:shape_solidGradientStartColor="#FFD280" />
|
||||
|
||||
</com.hjq.shape.layout.ShapeConstraintLayout>
|
@ -2,9 +2,8 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/cl_item"
|
||||
android:layout_width="@dimen/dp_310"
|
||||
android:layout_height="@dimen/dp_165"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_125"
|
||||
android:background="@mipmap/ic_vip_week_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
@ -31,11 +30,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="Weekly"
|
||||
android:textColor="#712B2B"
|
||||
android:textColor="#2493A4"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@ -46,10 +45,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:text="0"
|
||||
android:textColor="#FFB69A"
|
||||
android:textSize="@dimen/sp_19"
|
||||
android:textColor="#2493A4"
|
||||
android:textSize="@dimen/sp_30"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_day" />
|
||||
@ -59,10 +57,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="@dimen/dp_3"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
android:text="/Week"
|
||||
android:textColor="#FFB69A"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="#2493A4"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_money"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_money" />
|
||||
|
||||
@ -71,56 +69,45 @@
|
||||
android:id="@+id/tv_des"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:paddingHorizontal="@dimen/dp_7"
|
||||
android:paddingVertical="@dimen/dp_3"
|
||||
android:paddingVertical="@dimen/dp_2"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:singleLine="true"
|
||||
android:text="Unlimited access to all series for 1 week (No Ads)"
|
||||
android:textColor="#712B2B"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:textColor="#006574"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_money"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_money"
|
||||
app:shape_radius="@dimen/dp_20"
|
||||
app:shape_solidGradientEndColor="@color/transparent"
|
||||
app:shape_solidGradientStartColor="#FFCDCB" />
|
||||
app:shape_solidGradientStartColor="#A3F3FF" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:singleLine="true"
|
||||
android:text="Auto renew, cancel anytime"
|
||||
android:textColor="#45000000"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_des"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_des" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_expire"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:singleLine="true"
|
||||
android:visibility="gone"
|
||||
android:text="The donate coins will expire in 8 days"
|
||||
android:textColor="#45000000"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:textColor="#6CADB7"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_des"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_info" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_des"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<com.hjq.shape.layout.ShapeLinearLayout
|
||||
android:id="@+id/ll_extra"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:shape_radiusInBottomRight="@dimen/dp_15"
|
||||
app:shape_radiusInBottomRight="@dimen/dp_10"
|
||||
app:shape_radiusInTopLeft="@dimen/dp_15"
|
||||
app:shape_solidGradientEndColor="#FFE4CC"
|
||||
app:shape_solidGradientStartColor="#FFDDBF">
|
||||
@ -131,7 +118,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="+Extra 500"
|
||||
android:textColor="#8F5600"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
@ -142,16 +129,13 @@
|
||||
</com.hjq.shape.layout.ShapeLinearLayout>
|
||||
|
||||
|
||||
<com.hjq.shape.view.ShapeCheckBox
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
app:buttonCompat="@drawable/checkbox_selector"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/checkbox_checked_ic"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
BIN
app/src/main/res/mipmap-xxhdpi/ic_dialog_close_style_2.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_vip_month_bg.png
Normal file
After Width: | Height: | Size: 295 KiB |
Before Width: | Height: | Size: 215 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_vip_quarter_bg.png
Normal file
After Width: | Height: | Size: 285 KiB |
Before Width: | Height: | Size: 182 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_vip_week_bg.png
Normal file
After Width: | Height: | Size: 288 KiB |
Before Width: | Height: | Size: 190 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_vip_year_bg.png
Normal file
After Width: | Height: | Size: 317 KiB |
Before Width: | Height: | Size: 158 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/iv_store_coin_big_hot.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
@ -7,8 +7,8 @@ android {
|
||||
defaultConfig {
|
||||
minSdk 24
|
||||
targetSdk 34
|
||||
versionName '1.2.2'
|
||||
versionCode 14
|
||||
versionName '1.2.4'
|
||||
versionCode 16
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
|