Commit 916b59c3 authored by mengcuiguang's avatar mengcuiguang

Merge branch 'dev_wangzhuan_0906' of...

Merge branch 'dev_wangzhuan_0906' of http://gitlab.mints-id.com/android/android_vedio into dev_wangzhuan_0906
parents 55a9c9bc ee64f69d
...@@ -163,6 +163,11 @@ ...@@ -163,6 +163,11 @@
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.SongAwardActivity"
android:exported="false"
android:screenOrientation="portrait" />
<service <service
android:name=".ui.service.UpdateService" android:name=".ui.service.UpdateService"
android:exported="true" /> android:exported="true" />
......
...@@ -20,7 +20,6 @@ object Constant { ...@@ -20,7 +20,6 @@ object Constant {
const val ACTION_EXIT_APP = "package.exit" const val ACTION_EXIT_APP = "package.exit"
const val CARRIERTYPE_CSJ_VEDIO = "VEDIO_UNLOCK"
const val CARRIERTYPE_TX_VEDIO = "VEDIO_UNLOCK" const val CARRIERTYPE_TX_VEDIO = "VEDIO_UNLOCK"
const val CARRIERTYPE_REWARD_FIRST = "REWARD_FIRST" //新人红包视频 const val CARRIERTYPE_REWARD_FIRST = "REWARD_FIRST" //新人红包视频
const val CARRIERTYPE_SIGN = "FORCASH_SIGN" //签到 const val CARRIERTYPE_SIGN = "FORCASH_SIGN" //签到
...@@ -33,6 +32,8 @@ object Constant { ...@@ -33,6 +32,8 @@ object Constant {
const val CARRIERTYPE_SONG_MORE = "REWARD_GUESS_SONG_MORE" //翻倍 的入参 const val CARRIERTYPE_SONG_MORE = "REWARD_GUESS_SONG_MORE" //翻倍 的入参
const val CARRIERTYPE_SONG_ALL = "REWARD_GUESS_SONG_ALL" //画着红包直接看视频的入参 const val CARRIERTYPE_SONG_ALL = "REWARD_GUESS_SONG_ALL" //画着红包直接看视频的入参
const val CARRIERTYPE_VEDIO_UNLOCK = "VEDIO_UNLOCK"
const val CARRIERTYPE_VEDIO = "REWARD_VEDIO" //加金币
const val FRAGMENT_CLICK_ONE = 0 const val FRAGMENT_CLICK_ONE = 0
const val FRAGMENT_CLICK_TWO = 1 const val FRAGMENT_CLICK_TWO = 1
......
...@@ -69,7 +69,10 @@ class MusicPresenter : BasePresenter<MusicView>() { ...@@ -69,7 +69,10 @@ class MusicPresenter : BasePresenter<MusicView>() {
when (code) { when (code) {
200 -> { 200 -> {
view.reportAddCoinMsgSuc() val data = baseResponse.data
if (data != null) {
view.reportAddCoinMsgSuc(data["coin"].asInt, data["di"].asInt)
}
} }
else -> { else -> {
view.showToast(message) view.showToast(message)
......
...@@ -132,4 +132,42 @@ class VideoPresenter : BasePresenter<VideoView>() { ...@@ -132,4 +132,42 @@ class VideoPresenter : BasePresenter<VideoView>() {
} }
// 添加金币
fun reportAddCoinMsg(carrierType: String, ecpmId: String = "") {
val vo = HashMap<String, Any>()
vo["ecpmId"] = ecpmId
vo["carrierType"] = carrierType
AppHttpManager.getInstance(loanApplication)
.call(loanService.reportAddCoinMsg(vo),
object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
}
override fun onNext(baseResponse: BaseResponse<JsonObject>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
val data = baseResponse.data
if (data != null) {
view.reportAddCoinMsgSuc(data["coin"].asInt, data["di"].asInt)
}
}
else -> {
view.showToast(message)
}
}
}
})
}
} }
\ No newline at end of file
...@@ -5,5 +5,5 @@ import com.duben.dayplaylet.mvp.model.MusicBean ...@@ -5,5 +5,5 @@ import com.duben.dayplaylet.mvp.model.MusicBean
interface MusicView : BaseView { interface MusicView : BaseView {
fun rdSongMsgSuc(data: MusicBean) fun rdSongMsgSuc(data: MusicBean)
fun rdSongMsgFail() fun rdSongMsgFail()
fun reportAddCoinMsgSuc() fun reportAddCoinMsgSuc(coin: Int, di: Int)
} }
\ No newline at end of file
...@@ -3,7 +3,6 @@ package com.duben.dayplaylet.mvp.views ...@@ -3,7 +3,6 @@ package com.duben.dayplaylet.mvp.views
import com.duben.dayplaylet.mvp.model.IndexList import com.duben.dayplaylet.mvp.model.IndexList
import com.duben.dayplaylet.mvp.model.NineShowBean import com.duben.dayplaylet.mvp.model.NineShowBean
interface VideoView : BaseView { interface VideoView : BaseView {
fun getIndexListSuc(indexList: IndexList) fun getIndexListSuc(indexList: IndexList)
fun getIndexListFail() fun getIndexListFail()
...@@ -13,4 +12,6 @@ interface VideoView : BaseView { ...@@ -13,4 +12,6 @@ interface VideoView : BaseView {
fun rdVedioMsgSuc(surplusCount: Int, surplusSeconds: Int) fun rdVedioMsgSuc(surplusCount: Int, surplusSeconds: Int)
fun reportAddCoinMsgSuc(coin: Int, di: Int)
} }
\ No newline at end of file
package com.duben.dayplaylet.ui.activitys
import android.content.Intent
import android.os.Bundle
import android.view.KeyEvent
import android.view.View
import com.duben.dayplaylet.R
import com.duben.dayplaylet.ui.activitys.base.BaseActivity
import com.duben.library.utils.nodoubleclick.AntiShake
import kotlinx.android.synthetic.main.activity_song_award.*
/**
* 猜歌页-任务奖励
*/
class SongAwardActivity : BaseActivity(), View.OnClickListener {
companion object {
const val ACTIVITY_REQUEST_CODE = 0x03243
const val SONG_REDPACKET = "SONG_REDPACKET" //红包
const val SONG_YUANBAO = "SONG_YUANBAO" //元宝
}
private var yuanbao = 0
private var redPacket = 0
override fun getContentViewLayoutID() = R.layout.activity_song_award
override fun isApplyKitKatTranslucency() = false
override fun toggleOverridePendingTransition() = true
override fun getOverridePendingTransitionMode() = TransitionMode.FADE
override fun getBundleExtras(extras: Bundle?) {
super.getBundleExtras(extras)
extras?.let {
yuanbao = it.getInt(SONG_YUANBAO, 0)
redPacket = it.getInt(SONG_REDPACKET, 0)
}
}
override fun initViewsAndEvents() {
tv_award_redpkg.text = "+" + redPacket
tv_award_yuanbao.text = "+" + yuanbao
initListener()
}
private fun initListener() {
}
override fun finish() {
super.finish()
hideLoading()
overridePendingTransition(0, R.anim.scale_out)
}
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
return if (keyCode == KeyEvent.KEYCODE_BACK) {
true
} else super.onKeyDown(
keyCode,
event
)
}
override fun onClick(v: View) {
if (AntiShake.check(v.id)) return
val intent = Intent()
intent.putExtra(SONG_REDPACKET, redPacket)
intent.putExtra(SONG_YUANBAO, yuanbao)
when (v.id) {
R.id.iv_award_quit -> {
setResult(ACTIVITY_REQUEST_CODE, intent)
finish()
}
R.id.iv_song_award -> {
setResult(ACTIVITY_REQUEST_CODE, intent)
finish()
}
}
}
}
\ No newline at end of file
...@@ -29,7 +29,7 @@ public class CountDownView extends View { ...@@ -29,7 +29,7 @@ public class CountDownView extends View {
private int mRetreatType;//圆弧绘制方式(增加和减少) private int mRetreatType;//圆弧绘制方式(增加和减少)
private float mPaintArcWidth;//最外层圆弧的宽度 private float mPaintArcWidth;//最外层圆弧的宽度
private int mCircleRadius;//圆圈的半径 private int mCircleRadius;//圆圈的半径
private int mPaintArcColor = Color.parseColor("#3C3F41");//初始值 private int mPaintArcColor = Color.parseColor("#fea54c");//初始值
private int mPaintBackGroundColor = Color.parseColor("#55B2E5");//初始值 private int mPaintBackGroundColor = Color.parseColor("#55B2E5");//初始值
private int mLoadingTime;//时间,单位秒 private int mLoadingTime;//时间,单位秒
private String mLoadingTimeUnit = "";//时间单位 private String mLoadingTimeUnit = "";//时间单位
......
...@@ -46,12 +46,12 @@ class SignDialog(context: Context, listener: DialogListener, signMsg: SignInfoBe ...@@ -46,12 +46,12 @@ class SignDialog(context: Context, listener: DialogListener, signMsg: SignInfoBe
tv_sign_title.text = SpanUtils() tv_sign_title.text = SpanUtils()
.append("签到7天领") .append("签到7天领")
.setForegroundColor(context.resources.getColor(R.color.apk_uninstalled)) .setForegroundColor(context.resources.getColor(R.color.color_fea54c))
.append(signMsg.sumCash.toString()) .append(signMsg.sumCash.toString())
.setFontSize(BubbleUtils.sp2px(30)) .setFontSize(BubbleUtils.sp2px(30))
.setForegroundColor(context.resources.getColor(R.color.red)) .setForegroundColor(context.resources.getColor(R.color.red))
.append("元红包") .append("元红包")
.setForegroundColor(context.resources.getColor(R.color.apk_uninstalled)) .setForegroundColor(context.resources.getColor(R.color.color_fea54c))
.create() .create()
val cashList = signMsg.signWeekCashArr val cashList = signMsg.signWeekCashArr
......
...@@ -2,6 +2,7 @@ package com.duben.dayplaylet.ui.widgets ...@@ -2,6 +2,7 @@ package com.duben.dayplaylet.ui.widgets
import android.app.Dialog import android.app.Dialog
import android.content.Context import android.content.Context
import android.text.SpannableStringBuilder
import android.view.Gravity import android.view.Gravity
import android.view.KeyEvent import android.view.KeyEvent
import android.view.WindowManager import android.view.WindowManager
...@@ -12,6 +13,7 @@ import android.widget.TextView ...@@ -12,6 +13,7 @@ import android.widget.TextView
import com.duben.dayplaylet.R import com.duben.dayplaylet.R
import com.duben.dayplaylet.ad.express.ExpressAdCallback import com.duben.dayplaylet.ad.express.ExpressAdCallback
import com.duben.dayplaylet.ad.express.ExpressManager import com.duben.dayplaylet.ad.express.ExpressManager
import com.duben.dayplaylet.ad.express.MyExpressManager
import com.duben.dayplaylet.utils.UIUtils import com.duben.dayplaylet.utils.UIUtils
/** /**
...@@ -19,9 +21,7 @@ import com.duben.dayplaylet.utils.UIUtils ...@@ -19,9 +21,7 @@ import com.duben.dayplaylet.utils.UIUtils
*/ */
class VideoLockDialog( class VideoLockDialog(
context: Context, context: Context,
titleStr: String, titleStr: SpannableStringBuilder,
infoStr: String,
btnStr: String,
listener: DialogListener listener: DialogListener
) : ) :
Dialog(context, R.style.dialog) { Dialog(context, R.style.dialog) {
...@@ -31,7 +31,6 @@ class VideoLockDialog( ...@@ -31,7 +31,6 @@ class VideoLockDialog(
private val ibClose: ImageButton private val ibClose: ImageButton
private val flAd: FrameLayout private val flAd: FrameLayout
private val tvTitle: TextView private val tvTitle: TextView
private val tvInfo: TextView
private val unlock: Button private val unlock: Button
init { init {
...@@ -55,12 +54,9 @@ class VideoLockDialog( ...@@ -55,12 +54,9 @@ class VideoLockDialog(
ibClose = findViewById(R.id.ib_close) ibClose = findViewById(R.id.ib_close)
flAd = findViewById(R.id.fl_ad) flAd = findViewById(R.id.fl_ad)
tvTitle = findViewById(R.id.tv_title) tvTitle = findViewById(R.id.tv_title)
tvInfo = findViewById(R.id.tv_info)
unlock = findViewById(R.id.unlock) unlock = findViewById(R.id.unlock)
tvTitle.text = titleStr tvTitle.text = titleStr
tvInfo.text = infoStr
unlock.text = btnStr
ibClose.setOnClickListener { dismiss() } ibClose.setOnClickListener { dismiss() }
unlock.setOnClickListener(listener) unlock.setOnClickListener(listener)
...@@ -69,7 +65,7 @@ class VideoLockDialog( ...@@ -69,7 +65,7 @@ class VideoLockDialog(
} }
private fun showAdView() { private fun showAdView() {
ExpressManager.instance.getAdView(object : ExpressAdCallback { MyExpressManager.instance.getAdView(object : ExpressAdCallback {
override fun loadSuccess(adView: FrameLayout?) { override fun loadSuccess(adView: FrameLayout?) {
adView?.let { adView?.let {
UIUtils.removeFromParent(it) UIUtils.removeFromParent(it)
......
package com.duben.dayplaylet.ui.widgets
import android.app.Dialog
import android.content.Context
import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.WindowManager
import android.widget.ImageButton
import android.widget.ProgressBar
import android.widget.TextView
import androidx.core.content.ContextCompat
import com.airbnb.lottie.LottieAnimationView
import com.airbnb.lottie.LottieComposition
import com.airbnb.lottie.LottieCompositionFactory
import com.airbnb.lottie.LottieDrawable
import com.duben.dayplaylet.R
import com.duben.dayplaylet.utils.SpanUtils
/**
* 二级页面激励视频
*/
class VideoRewardDialog(
context: Context,
currentCash: Float,
listener: DialogListener
) :
Dialog(context, R.style.dialog) {
private val lp: WindowManager.LayoutParams
private val ibClose: ImageButton
private val ll: View
private val tvInfo: TextView
private val tvStr: TextView
private val pb: ProgressBar
private val lav: LottieAnimationView
init {
setContentView(R.layout.dialog_video_reward)
lp = window!!.attributes
lp.gravity = Gravity.CENTER
lp.width = WindowManager.LayoutParams.MATCH_PARENT
lp.height = WindowManager.LayoutParams.WRAP_CONTENT
lp.windowAnimations = R.style.DialogAnimFade
window!!.attributes = lp
// 设置外部不可关闭
setCancelable(true)
setCanceledOnTouchOutside(true)
setOnKeyListener { _, i, _ ->
i == KeyEvent.KEYCODE_BACK
}
listener.setDialog(this)
ibClose = findViewById(R.id.ib_close)
ll = findViewById(R.id.ll)
tvInfo = findViewById(R.id.tv_progress_info)
tvStr = findViewById(R.id.tv_progress_str)
pb = findViewById(R.id.pb)
lav = findViewById(R.id.lav)
tvInfo.text = SpanUtils()
.append("还差")
.append("${currentCash}元")
.setForegroundColor(ContextCompat.getColor(context, R.color.red))
.append("即可提现")
.append("100元")
.setForegroundColor(ContextCompat.getColor(context, R.color.red))
.create()
pb.max = 100
pb.progress = currentCash.toInt()
tvStr.text = "${currentCash}/100"
ibClose.setOnClickListener { dismiss() }
ll.setOnClickListener(listener)
playFingerAnim(lav)
}
private fun playFingerAnim(view: LottieAnimationView) {
view.visibility = View.VISIBLE
val lottieDrawable = LottieDrawable()
LottieCompositionFactory.fromAsset(context, "home_shouzhi.json")
.addListener { result: LottieComposition? ->
lottieDrawable.setImagesAssetsFolder("home_shouzhi/")
lottieDrawable.composition = result
lottieDrawable.loop(true)
lottieDrawable.playAnimation()
}
view.setImageDrawable(lottieDrawable)
}
}
\ No newline at end of file
...@@ -74,7 +74,7 @@ public class PanelItemView extends FrameLayout implements ItemView { ...@@ -74,7 +74,7 @@ public class PanelItemView extends FrameLayout implements ItemView {
iv_panel_item_pic.setImageResource(R.mipmap.ic_nine_mobile); iv_panel_item_pic.setImageResource(R.mipmap.ic_nine_mobile);
tv_panel_item_text.setTextColor(ContextCompat.getColor( tv_panel_item_text.setTextColor(ContextCompat.getColor(
context, context,
R.color.apk_uninstalled R.color.color_fea54c
)); ));
tv_panel_item_text.setTypeface(null, Typeface.BOLD); tv_panel_item_text.setTypeface(null, Typeface.BOLD);
break; break;
......
...@@ -72,7 +72,7 @@ public class PanelItemView2 extends FrameLayout implements ItemView { ...@@ -72,7 +72,7 @@ public class PanelItemView2 extends FrameLayout implements ItemView {
iv_panel_item_pic.setImageResource(R.mipmap.ic_nine_mobile); iv_panel_item_pic.setImageResource(R.mipmap.ic_nine_mobile);
tv_panel_item_text.setTextColor(ContextCompat.getColor( tv_panel_item_text.setTextColor(ContextCompat.getColor(
context, context,
R.color.apk_uninstalled R.color.color_fea54c
)); ));
tv_panel_item_text.setTypeface(null, Typeface.BOLD); tv_panel_item_text.setTypeface(null, Typeface.BOLD);
break; break;
......
...@@ -30,17 +30,16 @@ public class RxBus { ...@@ -30,17 +30,16 @@ public class RxBus {
} }
return mDefaultInstance; return mDefaultInstance;
} }
/*发送事件*/
/*发送事件*/
public void post(Object event) { public void post(Object event) {
if (mBus == null) { if (mBus == null) {
mDefaultInstance = new RxBus(); mDefaultInstance = new RxBus();
} }
mBus.onNext(event); mBus.onNext(event);
} }
/*订阅事件*/
/*订阅事件*/
public <T> Observable<T> toObservable(Class<T> eventType) { public <T> Observable<T> toObservable(Class<T> eventType) {
return mBus.ofType(eventType);//ofType可以根据事件类型发送指定数据 return mBus.ofType(eventType);//ofType可以根据事件类型发送指定数据
} }
...@@ -92,4 +91,20 @@ public class RxBus { ...@@ -92,4 +91,20 @@ public class RxBus {
} }
} }
public static class MsgEvent {
private String msg;
public MsgEvent(String msg) {
this.msg = msg;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ import android.app.Dialog ...@@ -4,6 +4,7 @@ import android.app.Dialog
import android.os.Bundle import android.os.Bundle
import android.util.Log import android.util.Log
import android.view.View import android.view.View
import androidx.core.content.ContextCompat
import com.bytedance.sdk.dp.* import com.bytedance.sdk.dp.*
import com.google.gson.Gson import com.google.gson.Gson
import com.duben.dayplaylet.R import com.duben.dayplaylet.R
...@@ -19,10 +20,8 @@ import com.duben.dayplaylet.mvp.presenters.VideoPresenter ...@@ -19,10 +20,8 @@ import com.duben.dayplaylet.mvp.presenters.VideoPresenter
import com.duben.dayplaylet.mvp.views.VideoView import com.duben.dayplaylet.mvp.views.VideoView
import com.duben.dayplaylet.ui.activitys.base.BaseActivity import com.duben.dayplaylet.ui.activitys.base.BaseActivity
import com.duben.dayplaylet.ui.adapter.VideoEpisodeAdapter import com.duben.dayplaylet.ui.adapter.VideoEpisodeAdapter
import com.duben.dayplaylet.ui.widgets.CountDownVideoView import com.duben.dayplaylet.ui.widgets.*
import com.duben.dayplaylet.ui.widgets.DialogListener import com.duben.dayplaylet.utils.SpanUtils
import com.duben.dayplaylet.ui.widgets.VideoEpisodeDialog
import com.duben.dayplaylet.ui.widgets.VideoLockDialog
import com.duben.library.utils.nodoubleclick.AntiShake import com.duben.library.utils.nodoubleclick.AntiShake
import kotlinx.android.synthetic.main.drama_activity_api_detail.* import kotlinx.android.synthetic.main.drama_activity_api_detail.*
import kotlinx.android.synthetic.main.layout_draw_header.* import kotlinx.android.synthetic.main.layout_draw_header.*
...@@ -61,6 +60,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic ...@@ -61,6 +60,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
private var mHasUnlockIndexMap = mutableMapOf<Long, MutableList<Int>>() private var mHasUnlockIndexMap = mutableMapOf<Long, MutableList<Int>>()
private var mVideoLockDialog: VideoLockDialog? = null private var mVideoLockDialog: VideoLockDialog? = null
private var mVideoRewardDialog: VideoRewardDialog? = null
private var lastIndex = 1 private var lastIndex = 1
...@@ -200,6 +200,9 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic ...@@ -200,6 +200,9 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
(map?.get("index") as? Int?)?.let { (map?.get("index") as? Int?)?.let {
lastIndex = it lastIndex = it
} }
if (cdvv.isPlaying) {
cdvv.resume()
}
} }
override fun onDPVideoPause(map: MutableMap<String, Any>?) { override fun onDPVideoPause(map: MutableMap<String, Any>?) {
...@@ -396,17 +399,32 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic ...@@ -396,17 +399,32 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
} }
override fun rdVedioMsgSuc(surplusCount: Int, surplusSeconds: Int) { override fun rdVedioMsgSuc(surplusCount: Int, surplusSeconds: Int) {
// if (surplusCount > 0) { if (surplusCount > 0) {
// cl_red_box.visibility = View.VISIBLE cl_red_box.visibility = View.VISIBLE
// cdvv.setTime(surplusSeconds) tv_tips.text = SpanUtils()
// cdvv.setCountDownVideoListener(this) .append("点击领取 ")
// } else { .append("大额红包")
// cl_red_box.visibility = View.GONE .setForegroundColor(ContextCompat.getColor(this, R.color.red))
// } .create()
tv_tips.visibility = View.GONE
triangle.visibility = View.GONE
cdvv.setTime(surplusSeconds)
cdvv.setCountDownVideoListener(this)
} else {
cl_red_box.visibility = View.GONE
}
} }
override fun onLoadingFinish() { override fun reportAddCoinMsgSuc(coin: Int, di: Int) {
}
override fun onLoadingFinish() {
cl_red_box.setOnClickListener {
showRedboxDialog()
}
tv_tips.visibility = View.VISIBLE
triangle.visibility = View.VISIBLE
} }
override fun onClick(v: View?) { override fun onClick(v: View?) {
...@@ -428,20 +446,41 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic ...@@ -428,20 +446,41 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
private fun showLockDialog(drama: DPDrama, widget: IDPWidget) { private fun showLockDialog(drama: DPDrama, widget: IDPWidget) {
mVideoLockDialog = VideoLockDialog( mVideoLockDialog = VideoLockDialog(
this, this,
String.format( SpanUtils()
"解锁%s·第%d-%d集", .append("解锁")
drama.title, .append(" $lockSet ")
mInitUnlockIndex + 1, .setForegroundColor(ContextCompat.getColor(this, R.color.red))
mInitUnlockIndex + lockSet .append("集剧情")
), .create(),
String.format("看激励视频解锁%d集剧情\n请按照顺序解锁", lockSet), object : DialogListener() {
"观看激励视频", override fun onClick(dialog: Dialog?, v: View?) {
super.onClick(dialog, v)
dialog?.dismiss()
showAd(Constant.CARRIERTYPE_VEDIO_UNLOCK, drama, widget)
}
}
)
mVideoLockDialog?.show()
}
private fun showRedboxDialog() {
mVideoRewardDialog = VideoRewardDialog(
this,
30f,
object : DialogListener() { object : DialogListener() {
override fun onClick(dialog: Dialog?, v: View?) { override fun onClick(dialog: Dialog?, v: View?) {
super.onClick(dialog, v) super.onClick(dialog, v)
dialog?.dismiss() dialog?.dismiss()
showAd(Constant.CARRIERTYPE_VEDIO)
}
}
)
val carrierType = Constant.CARRIERTYPE_CSJ_VEDIO mVideoRewardDialog?.show()
}
private fun showAd(carrierType: String, drama: DPDrama? = null, widget: IDPWidget? = null) {
AdManager.instance.showAd(this@DramaApiDetailActivity, carrierType, AdManager.instance.showAd(this@DramaApiDetailActivity, carrierType,
object : AdStatusListener { object : AdStatusListener {
var canFail = false var canFail = false
...@@ -451,49 +490,54 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic ...@@ -451,49 +490,54 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
override fun adFail() { override fun adFail() {
if (canFail) return if (canFail) return
showLoading("正在获取视频", false)
NoPreAdManager.loadVideoAd( NoPreAdManager.loadVideoAd(
this@DramaApiDetailActivity, this@DramaApiDetailActivity,
carrierType, object : AdStatusListener { carrierType, object : AdStatusListener {
override fun adFail() { override fun adFail() {
hideLoading()
showToast("广告太火爆了,请稍候再试") showToast("广告太火爆了,请稍候再试")
} }
override fun adSuccess() { override fun adSuccess() {
hideLoading()
} }
override fun adClose(vo: HashMap<String, Any>?) { override fun adClose(vo: HashMap<String, Any>?) {
vo?.let { hideLoading()
if (isThirdId) { when (carrierType) {
it["thirdId"] = "" + mVedioBean!!.thirdId Constant.CARRIERTYPE_VEDIO_UNLOCK -> {
} else { if (drama != null && widget != null) {
it["vedioId"] = "" + mVedioBean!!.vedioId unlock(vo, drama, widget)
} }
videoPresenter.unlock(it)
} }
Constant.CARRIERTYPE_VEDIO -> {
// 更新解锁集数
for (i in 1 until lockSet) {
val hasUnlockList: MutableList<Int> =
mHasUnlockIndexMap[drama.id] ?: mutableListOf()
hasUnlockList.add(widget.currentDramaIndex + i)
mHasUnlockIndexMap[drama.id] = hasUnlockList
} }
mInitUnlockIndex = mUnlockIndexMap[drama.id]!! + lockSet else -> {}
mUnlockIndexMap[drama.id] = }
mUnlockIndexMap[drama.id]!! + lockSet
mVedioBean!!.unlockIndex = mInitUnlockIndex
// 播放当前集
mVedioBean!!.seeIndex = mCurrentIndex
mVedioBean!!.orderTags = orderTagsList
LocalVedioManager.commitVedio(mVedioBean!!)
unlockCallback?.onDramaRewardArrived() // 解锁当前集
} }
}) })
} }
override fun adClose(vo: HashMap<String, Any>?) { override fun adClose(vo: HashMap<String, Any>?) {
when (carrierType) {
Constant.CARRIERTYPE_VEDIO_UNLOCK -> {
if (drama != null && widget != null) {
unlock(vo, drama, widget)
}
}
Constant.CARRIERTYPE_VEDIO -> {
}
else -> {}
}
}
})
}
private fun unlock(vo: HashMap<String, Any>?, drama: DPDrama, widget: IDPWidget) {
vo?.let { vo?.let {
if (isThirdId) { if (isThirdId) {
it["thirdId"] = "" + mVedioBean!!.thirdId it["thirdId"] = "" + mVedioBean!!.thirdId
...@@ -511,7 +555,8 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic ...@@ -511,7 +555,8 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
mHasUnlockIndexMap[drama.id] = hasUnlockList mHasUnlockIndexMap[drama.id] = hasUnlockList
} }
mInitUnlockIndex = mUnlockIndexMap[drama.id]!! + lockSet mInitUnlockIndex = mUnlockIndexMap[drama.id]!! + lockSet
mUnlockIndexMap[drama.id] = mUnlockIndexMap[drama.id]!! + lockSet mUnlockIndexMap[drama.id] =
mUnlockIndexMap[drama.id]!! + lockSet
mVedioBean!!.unlockIndex = mInitUnlockIndex mVedioBean!!.unlockIndex = mInitUnlockIndex
// 播放当前集 // 播放当前集
...@@ -520,11 +565,4 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic ...@@ -520,11 +565,4 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
LocalVedioManager.commitVedio(mVedioBean!!) LocalVedioManager.commitVedio(mVedioBean!!)
unlockCallback?.onDramaRewardArrived() // 解锁当前集 unlockCallback?.onDramaRewardArrived() // 解锁当前集
} }
})
}
}
)
mVideoLockDialog?.show()
}
} }
\ No newline at end of file
...@@ -200,6 +200,10 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView, ...@@ -200,6 +200,10 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
} }
override fun reportAddCoinMsgSuc(coin: Int, di: Int) {
}
override fun onEpisodeClick(position: Int) { override fun onEpisodeClick(position: Int) {
dialog?.dismiss() dialog?.dismiss()
val data = super_short_video_view.data val data = super_short_video_view.data
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- solid指定形状的填充色,只有android:color一个属性 -->
<solid android:color="@color/color_fea54c" />
<!-- padding设置内容区域离边界的间距 -->
<!-- corners设置圆角,只适用于rectangle -->
<corners android:radius="30dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- solid指定形状的填充色,只有android:color一个属性 -->
<solid android:color="#F13D3D" />
<!-- padding设置内容区域离边界的间距 -->
<!-- corners设置圆角,只适用于rectangle -->
<corners android:radius="30dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!--3个层的顺序即为显示时的叠加顺序-->
<!--背景色-->
<item android:id="@android:id/background"> <item android:id="@android:id/background">
<shape> <shape>
<corners android:radius="5dip" /> <corners android:radius="30dp" />
<solid android:color="#FFE9E9" /> <solid android:color="#FFE9E9" />
</shape> </shape>
</item> </item>
<!--一级进度条的颜色,也可以直接替换成图片--> <item android:id="@android:id/secondaryProgress">
<scale android:scaleWidth="100%">
<shape>
<corners android:radius="30dp" />
<solid android:color="#F13D3D" />
</shape>
</scale>
</item>
<item android:id="@android:id/progress"> <item android:id="@android:id/progress">
<!--
<clip> <clip>
<shape> <shape>
<corners android:radius="5dip" /> <corners android:topRightRadius="20dp"
<solid android:color="#F13D3D" /> android:bottomRightRadius="20dp"/>
<solid android:color="#FF009898"/>
</shape> </shape>
</clip> </clip>
-->
<scale
android:drawable="@drawable/progress_bar_ct2"
android:scaleWidth="100%" />
</item> </item>
</layer-list> </layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="30dp" />
<solid android:color="#FFE9E9" />
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<scale android:scaleWidth="100%">
<shape>
<corners android:radius="30dp" />
<solid android:color="@color/color_fea54c" />
</shape>
</scale>
</item>
<item android:id="@android:id/progress">
<!--
<clip>
<shape>
<corners android:topRightRadius="20dp"
android:bottomRightRadius="20dp"/>
<solid android:color="#FF009898"/>
</shape>
</clip>
-->
<scale
android:drawable="@drawable/progress_bar_ct"
android:scaleWidth="100%" />
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 正三角 -->
<item>
<rotate
android:fromDegrees="45"
android:pivotX="135%"
android:pivotY="15%">
<shape android:shape="rectangle">
<size
android:width="16dp"
android:height="16dp" />
<solid android:color="#FFF" />
</shape>
</rotate>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 弧形的半径 -->
<corners android:radius="30dip" />
<stroke
android:width="1dp"
android:color="@color/white" />
<solid android:color="@color/color_fea54c" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#99000000"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/bg_task"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_award_quit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:src="@mipmap/ic_draw_quit" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="110dp"
android:layout_marginRight="20dp"
android:background="@drawable/shape_bg_task"
android:orientation="horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp">
<LinearLayout
android:id="@+id/ll_award_redpkg"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|center_vertical"
android:layout_weight="1"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingTop="16dp"
android:paddingRight="10dp"
android:paddingBottom="6dp">
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/ic_redpkg" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_award_redpkg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="18dp"
android:background="@drawable/shape_banner_write"
android:gravity="center"
android:paddingLeft="18dp"
android:paddingTop="3dp"
android:paddingRight="18dp"
android:paddingBottom="3dp"
android:text="+10"
android:textColor="@color/red"
android:textSize="18sp" />
</FrameLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_award_yuanbao"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|center_vertical"
android:layout_weight="1"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingTop="16dp"
android:paddingRight="10dp"
android:paddingBottom="6dp">
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/ic_yuanbao" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_award_yuanbao"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="18dp"
android:background="@drawable/shape_banner_write"
android:gravity="center"
android:paddingLeft="18dp"
android:paddingTop="3dp"
android:paddingRight="18dp"
android:paddingBottom="3dp"
android:text="+10"
android:textColor="@color/red"
android:textSize="18sp" />
</FrameLayout>
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/iv_song_award"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="26dp"
android:background="@mipmap/img_reward_play_button_bg"
android:text="开心收下"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/block_view" android:id="@+id/block_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<ImageButton
android:id="@+id/ib_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/ll"
android:layout_alignParentEnd="true"
android:layout_marginEnd="30dp"
android:background="@mipmap/ic_close_circle" />
<LinearLayout <LinearLayout
android:id="@+id/ll"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="30dp" android:layout_marginStart="30dp"
android:layout_marginEnd="30dp" android:layout_marginEnd="30dp"
android:background="@drawable/shape_bg_write" android:background="@mipmap/bg_unlock"
android:gravity="center" android:gravity="center_horizontal"
android:orientation="vertical"> android:orientation="vertical">
<ImageButton <TextView
android:id="@+id/ib_close" android:id="@+id/tv_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="end" android:layout_marginTop="140dp"
android:layout_marginTop="@dimen/dp_10" android:layout_marginBottom="20dp"
android:layout_marginEnd="@dimen/dp_10" android:textColor="@color/black"
android:background="@mipmap/ic_close" /> android:textSize="20sp"
android:textStyle="bold" />
<com.duben.dayplaylet.ui.widgets.RoundRectLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/fl_ad" android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/shape_bg_write" /> android:layout_marginBottom="20dp">
<ImageView
android:id="@+id/iv_tips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_withdraw_tip"
app:layout_constraintEnd_toEndOf="@id/tv_info2"
app:layout_constraintStart_toStartOf="@id/tv_info2"
app:layout_constraintTop_toBottomOf="@id/tv_info2"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/tv_title" android:id="@+id/tv_info1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10dp" android:text="并领取最高"
android:layout_marginBottom="10dp" android:textSize="18sp"
android:text="试看已结束" app:layout_constraintBottom_toBottomOf="parent"
android:textColor="@color/black" app:layout_constraintStart_toStartOf="parent" />
android:textSize="16sp"
android:textStyle="bold" />
<TextView <TextView
android:id="@+id/tv_info" android:id="@+id/tv_info2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="20dp" android:text=" 10 "
android:gravity="center" android:textColor="@color/red"
android:text="试看已结束" /> android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/tv_info3"
app:layout_constraintStart_toEndOf="@id/tv_info1"
app:layout_constraintTop_toBottomOf="@id/iv_tips" />
<TextView
android:id="@+id/tv_info3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="元红包"
android:textSize="18sp"
app:constraintSet="@id/tv_info2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_info2" />
</androidx.constraintlayout.widget.ConstraintLayout>
<Button <Button
android:id="@+id/unlock" android:id="@+id/unlock"
android:layout_width="230dp" android:layout_width="243dp"
android:layout_height="40dp" android:layout_height="48dp"
android:layout_marginBottom="10dp" android:background="@mipmap/ic_btn_unlock"
android:background="@mipmap/bg_detail_top"
android:paddingStart="30dp"
android:text="看广告解锁1集"
android:textColor="@color/white" /> android:textColor="@color/white" />
</LinearLayout> </LinearLayout>
</FrameLayout> <com.duben.dayplaylet.ui.widgets.RoundRectLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/ll"
android:layout_marginStart="30dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="@dimen/font_size_30"
android:background="@drawable/shape_bg_write" />
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/block_view"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageButton
android:id="@+id/ib_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="@id/ll"
android:background="@mipmap/ic_close_circle" />
<RelativeLayout
android:id="@+id/ll"
android:layout_width="280dp"
android:layout_height="344dp"
android:layout_below="@id/ib_close"
android:layout_centerHorizontal="true"
android:background="@mipmap/bg_circle_red">
<ImageView
android:id="@+id/iv_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:src="@mipmap/ic_launcher_main" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/iv_logo"
android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp">
<TextView
android:id="@+id/tv_info1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="10"
android:textColor="@color/color_FFFC9F"
android:textSize="70sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tv_info2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="18dp"
android:text="元"
android:textColor="@color/color_FFFC9F"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_info1" />
<TextView
android:id="@+id/tv_info3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="18sp"
android:text="最高"
android:textColor="@color/btn_enabled"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@id/tv_info1"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/unlock"
android:layout_centerHorizontal="true"
android:layout_marginBottom="10dp"
android:background="@drawable/shape_half_trans"
android:paddingStart="16dp"
android:paddingTop="2dp"
android:paddingEnd="16dp"
android:paddingBottom="2dp"
android:text="领取追剧奖励"
android:textColor="@color/color_FFFC9F" />
<Button
android:id="@+id/unlock"
android:layout_width="96dp"
android:layout_height="96dp"
android:layout_above="@id/tv_bottom"
android:layout_centerHorizontal="true"
android:layout_marginBottom="6dp"
android:background="@mipmap/btn_open_red" />
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/lav"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_alignEnd="@id/unlock"
android:layout_alignBottom="@id/unlock"
android:layout_marginEnd="-20dp"
android:layout_marginBottom="-20dp" />
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignBottom="@id/unlock"
android:layout_centerHorizontal="true"
android:layout_marginBottom="6dp"
android:src="@mipmap/ic_envelope_video" />
<TextView
android:id="@+id/tv_bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="15dp"
android:text="看的越多,赚的越多"
android:textColor="@color/color_FFFC9F" />
</RelativeLayout>
<RelativeLayout
android:layout_width="290dp"
android:layout_height="80dp"
android:layout_below="@id/ll"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:background="@drawable/shape_banner_write"
android:padding="@dimen/dp_10">
<TextView
android:id="@+id/tv_progress_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:textColor="@color/black"
android:textSize="16sp" />
<ProgressBar
android:id="@+id/pb"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_alignParentBottom="true"
android:layout_marginEnd="36dp"
android:layout_marginBottom="2dp"
android:max="100"
android:progress="50"
android:progressDrawable="@drawable/progressbar_versus_vedio_bg" />
<TextView
android:id="@+id/tv_progress_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@id/pb"
android:layout_alignTop="@id/pb"
android:layout_alignEnd="@id/pb"
android:gravity="center"
android:text="10/100"
android:textColor="@color/white"
android:textSize="16sp" />
<ImageView
android:layout_width="51dp"
android:layout_height="60dp"
android:layout_alignParentEnd="true"
android:src="@mipmap/ic_redpkg" />
</RelativeLayout>
</RelativeLayout>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="立即清理" android:text="立即清理"
android:textColor="@color/apk_uninstalled" android:textColor="@color/color_fea54c"
android:textSize="18sp" /> android:textSize="18sp" />
</LinearLayout> </LinearLayout>
......
...@@ -9,15 +9,29 @@ ...@@ -9,15 +9,29 @@
android:id="@+id/tv_tips" android:id="@+id/tv_tips"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/shape_tips" android:layout_marginBottom="10dp"
android:elevation="2dp" android:background="@drawable/shape_bg_write"
android:padding="5dp" android:gravity="center"
android:text="点击红包可以领取金币哦~" android:paddingStart="4dp"
android:textColor="@color/white" android:paddingTop="2dp"
android:textSize="14sp" android:paddingEnd="4dp"
android:visibility="gone" android:paddingBottom="2dp"
android:text="-"
android:textColor="@color/black"
android:textSize="12sp"
android:visibility="visible"
app:layout_constraintBottom_toTopOf="@+id/linearLayout" app:layout_constraintBottom_toTopOf="@+id/linearLayout"
app:layout_constraintEnd_toStartOf="@+id/linearLayout" /> app:layout_constraintStart_toStartOf="@+id/linearLayout" />
<View
android:id="@+id/triangle"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_marginStart="16dp"
android:background="@drawable/shape_triangle"
android:visibility="gone"
app:layout_constraintStart_toStartOf="@id/tv_tips"
app:layout_constraintTop_toBottomOf="@id/tv_tips" />
<LinearLayout <LinearLayout
android:id="@+id/linearLayout" android:id="@+id/linearLayout"
...@@ -39,6 +53,17 @@ ...@@ -39,6 +53,17 @@
android:id="@+id/cdvv" android:id="@+id/cdvv"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<TextView
android:layout_width="42dp"
android:layout_height="18dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-6dp"
android:background="@drawable/shape_tv_video"
android:gravity="center"
android:text="+20元"
android:textColor="@color/white"
android:textSize="10sp" />
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -11,11 +11,10 @@ ...@@ -11,11 +11,10 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_margin="4dp"
app:cd_animator_time="8" app:cd_animator_time="8"
app:cd_arc_color="@color/color_FF9837" app:cd_arc_color="@color/color_fea54c"
app:cd_arc_width="3dp" app:cd_arc_width="3dp"
app:cd_bg_color="#20FF9837" app:cd_bg_color="@color/white"
app:cd_circle_radius="25dp" app:cd_circle_radius="25dp"
app:cd_location="top" app:cd_location="top"
app:cd_retreat_type="forward" app:cd_retreat_type="forward"
...@@ -27,6 +26,6 @@ ...@@ -27,6 +26,6 @@
android:layout_width="28dp" android:layout_width="28dp"
android:layout_height="32dp" android:layout_height="32dp"
android:layout_gravity="center" android:layout_gravity="center"
android:src="@mipmap/ic_launcher_main" android:src="@mipmap/withdraw_wx"
tools:visibility="gone" /> tools:visibility="gone" />
</FrameLayout> </FrameLayout>
...@@ -24,10 +24,8 @@ ...@@ -24,10 +24,8 @@
<color name="color_F61F03">#FD563B</color> <color name="color_F61F03">#FD563B</color>
<color name="color_fea54c">#fea54c</color>
<color name="apk_uninstalled">#fea54c</color> <color name="color_FFFC9F">#FFFC9F</color>
<color name="color_8D8F90">#7F8182</color> <color name="color_8D8F90">#7F8182</color>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment