Commit 49d3c7e6 authored by jyx's avatar jyx

首页添加福袋,更换趣步赚SDK

parent be57a7e4
......@@ -136,6 +136,7 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
// 网络请求
implementation 'com.squareup.retrofit2:retrofit:2.7.1'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
......
......@@ -7,6 +7,7 @@ import android.content.Intent
import cn.jpush.android.api.BasicPushNotificationBuilder
import cn.jpush.android.api.JPushInterface
import com.mints.goodmoney.manager.BxmManager.initBxm
import com.mints.goodmoney.manager.ZhangyueManager
import com.mints.library.utils.CommonUtils
import com.mob.MobSDK
import com.orhanobut.logger.AndroidLogAdapter
......
......@@ -26,6 +26,8 @@ import com.mints.goodmoney.utils.ForegroundOrBackground;
import com.mints.goodmoney.utils.LogUtil;
import com.mints.goodmoney.utils.SystemUtils;
import java.util.concurrent.Executors;
import rx.Scheduler;
import rx.schedulers.Schedulers;
......@@ -64,8 +66,12 @@ public class MintsApplication extends MultiDexApplication {
String processName = getProcessName(this);
String packageName = this.getPackageName();
if (!packageName.equals(processName)) {
// 为不同进程webView设置不同目录
WebView.setDataDirectorySuffix(processName);
try {
// 为不同进程webView设置不同目录
WebView.setDataDirectorySuffix("dds_" + processName);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
......@@ -79,7 +85,7 @@ public class MintsApplication extends MultiDexApplication {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(base);
// MultiDex.install(this);
// 9.0之后不可多进程使用一个目录下的WebView,写在SDK初始化之前
androidPWebView();
......@@ -182,7 +188,7 @@ public class MintsApplication extends MultiDexApplication {
public Scheduler defaultSubscribeScheduler() {
if (defaultSubscribeScheduler == null) {
defaultSubscribeScheduler = Schedulers.io();
defaultSubscribeScheduler = Schedulers.from(Executors.newFixedThreadPool(10));
}
return defaultSubscribeScheduler;
}
......
......@@ -123,6 +123,9 @@ object Constant {
const val CARRIER_HOMEVEDIO_CHALLENGE = "HOMEVEDIO_CHALLENGE" //首页视频挑战
const val CARRIER_MINIVEDIO_CHALLENGE = "MINIVEDIO_CHALLENGE" //短视频挑战
const val CARRIER_ZHANGYUE_CHALLENGE = "ZHANGYUE_CHALLENGE" //看小说挑战
const val CARRIER_BLESSINGBAG = "BLESSINGBAG" //首页福袋
const val CARRIER_BLESSINGBAG_DOUBLE = "BLESSINGBAG_DOUBLE" //首页福袋翻倍
const val CHALLENGE_SHAREFRIEND = "CHALLENGE_SHAREFRIEND" //邀请好友
......
......@@ -53,7 +53,7 @@ class DeviceInfo private constructor() {
val elapsedRealtime = SystemClock.elapsedRealtime()
/**
*
* 运营商相关信息
*/
val newModel: String
get() {
......@@ -63,6 +63,8 @@ class DeviceInfo private constructor() {
}
/**
* 双卡信息只能在(android 5.1-9.0)获取
*
* 运营商名称
*
*/
......@@ -71,6 +73,7 @@ class DeviceInfo private constructor() {
val sb = StringBuilder("")
try {
// 判断是否使用单卡 (android10 获取不到双卡信息,只能获取单卡)
var needSingleSim = false
// 卡1
val simStateBySlotIdx1 = SimUtils.getSimStateBySlotIdx(MintsApplication.getContext(), 0)
......@@ -81,7 +84,6 @@ class DeviceInfo private constructor() {
if (simStateBySlotIdx1) {
val providersName1 = SimUtils.getSimOperatorName2(MintsApplication.getContext(), 0)
if (TextUtils.equals(providersName1, "unknown")) {
needSingleSim = true
sb.append(SimUtils.getSimOperatorNameBySingle(MintsApplication.getContext()) + " ")
......@@ -98,17 +100,41 @@ class DeviceInfo private constructor() {
if (TextUtils.equals(providersName2, "unknown") && !needSingleSim) {
sb.append(SimUtils.getSimOperatorNameBySingle(MintsApplication.getContext()) + " ")
} else {
sb.append("$providersName2 ")
sb.append("$providersName2")
}
} else {
sb.append("未插卡 ")
sb.append("未插卡")
}
} catch (e: Exception) {
e.printStackTrace()
}
return sb.toString()
}
/**
* 是否使用vpn 需使用网络权限
*/
val isVPN: Boolean
get() {
try {
val niList = NetworkInterface.getNetworkInterfaces()
if (niList != null) {
for (intf in Collections.list(niList)) {
if (!intf.isUp || intf.interfaceAddresses.size == 0) {
continue
}
if ("tun0" == intf.name || "ppp0" == intf.name) {
return true // The VPN is up
}
}
}
} catch (e: Throwable) {
e.printStackTrace()
}
return false
}
/**
* 手机内存大小
*
......@@ -839,7 +865,6 @@ class DeviceInfo private constructor() {
}
companion object {
private var _inst: DeviceInfo? = null
val instance: DeviceInfo
......
......@@ -31,6 +31,10 @@ public class TTPreLoadCarrierExpressManager {
return _inst;
}
private TTPreLoadCarrierExpressManager() {
init();
}
private void init() {
ttNativeExpressManager = new TTNativeExpressManager();
ttNativeExpressManager.initTTAd(false);
......@@ -101,7 +105,7 @@ public class TTPreLoadCarrierExpressManager {
* 预加载 信息流
*/
public void loadTtFrameLayout(String codeId) {
init();
// init();
ToastUtil.showLong(MintsApplication.getContext(), "信息流:" + codeId);
......
......@@ -8,6 +8,54 @@ public class MainVedioMsgBean implements Serializable {
private int rewardDoubleCoin;
private int rewardCoin;
private int createRewardNeedTime;
private BlessingBigMsgBean blessingBigMsg;
public BlessingBigMsgBean getBlessingBigMsgBean() {
return blessingBigMsg;
}
public void setBlessingBigMsgBean(BlessingBigMsgBean blessingBigMsg) {
this.blessingBigMsg = blessingBigMsg;
}
public class BlessingBigMsgBean implements Serializable {
private int doubleCoin;
private int surplusCount;
private int surplusSeconds;
private int coin;
public int getDoubleCoin() {
return doubleCoin;
}
public void setDoubleCoin(int doubleCoin) {
this.doubleCoin = doubleCoin;
}
public int getSurplusCount() {
return surplusCount;
}
public void setSurplusCount(int surplusCount) {
this.surplusCount = surplusCount;
}
public int getSurplusSeconds() {
return surplusSeconds;
}
public void setSurplusSeconds(int surplusSeconds) {
this.surplusSeconds = surplusSeconds;
}
public int getCoin() {
return coin;
}
public void setCoin(int coin) {
this.coin = coin;
}
}
public boolean isToCreateReward() {
return toCreateReward;
......
......@@ -8,10 +8,58 @@ public class UserTaskMsgBean implements Serializable {
private OfflineBean offline;
private UserMsgBean userMsg;
private VedioRulesBean vedioRules;
private BlessingBigMsgBean blessingBigMsg;
private String ip;
private String userRiskApp;
public BlessingBigMsgBean getBlessingBigMsgBean() {
return blessingBigMsg;
}
public void setBlessingBigMsgBean(BlessingBigMsgBean blessingBigMsg) {
this.blessingBigMsg = blessingBigMsg;
}
public class BlessingBigMsgBean implements Serializable {
private int doubleCoin;
private int surplusCount;
private int surplusSeconds;
private int coin;
public int getDoubleCoin() {
return doubleCoin;
}
public void setDoubleCoin(int doubleCoin) {
this.doubleCoin = doubleCoin;
}
public int getSurplusCount() {
return surplusCount;
}
public void setSurplusCount(int surplusCount) {
this.surplusCount = surplusCount;
}
public int getSurplusSeconds() {
return surplusSeconds;
}
public void setSurplusSeconds(int surplusSeconds) {
this.surplusSeconds = surplusSeconds;
}
public int getCoin() {
return coin;
}
public void setCoin(int coin) {
this.coin = coin;
}
}
public OfflineBean getOfflineBean() {
return offline;
}
......
......@@ -17,13 +17,11 @@ import com.mints.goodmoney.mvp.views.AwardView
import com.mints.goodmoney.ui.activitys.base.BaseActivity
import com.mints.goodmoney.ui.widgets.countdowntimer.CountDownTimerSupport
import com.mints.goodmoney.ui.widgets.countdowntimer.OnCountDownTimerListener
import com.mints.goodmoney.utils.LogUtil
import com.mints.goodmoney.utils.SoundPoolUtil
import com.mints.goodmoney.utils.SpanUtils
import com.mints.goodmoney.utils.Utils
import com.mints.goodmoney.utils.rxutil.CommonRxTask
import com.mints.goodmoney.utils.rxutil.RxjavaUtil
import com.mints.library.utils.json.JsonUtil
import com.umeng.analytics.MobclickAgent
import kotlinx.android.synthetic.main.activity_award.*
import java.math.BigDecimal
......@@ -165,6 +163,17 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
tvAwardContent.setText("${curCoin}金币已到账")
tvAwardNext.setText("我知道了")
}
Constant.CARRIER_BLESSINGBAG -> {
val vo = HashMap<String, Any>()
vo["carrierType"] = carrierType
awardPresenter.reportAddCoinMsg(vo)
tvAwardContent.setText("${curCoin}金币已到账")
tvAwardNext.setText("看视频再领${extraId}金币")
curCoin = extraId.toInt()
carrierType = Constant.CARRIER_BLESSINGBAG_DOUBLE
}
Constant.CARRIER_HOMEVEDIO -> {
val vo = HashMap<String, Any>()
vo["carrierType"] = carrierType
......@@ -352,8 +361,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
Constant.CARRIER_RUISHINEWS_DOUBLE -> {
awardVedio()
}
Constant.CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE, Constant.CARRIER_HOMEVEDIO_DOUBLE,
Constant.CARRIER_SMALLHOMEVEDIO_DOUBLE -> {
Constant.CARRIER_BLESSINGBAG_DOUBLE, Constant.CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE,
Constant.CARRIER_HOMEVEDIO_DOUBLE, Constant.CARRIER_SMALLHOMEVEDIO_DOUBLE -> {
pushUmengEvent()
awardVedio()
}
......
......@@ -50,7 +50,6 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
svWalk?.destoryAnim()
flSubsidykAd?.removeAllViews()
TTPreLoadCarrierExpressManager.getInstance().onDestroy()
foodSubsidyPresenter.detachView()
}
......
......@@ -2,7 +2,6 @@ package com.mints.goodmoney.ui.activitys
import android.content.Context
import android.media.AudioManager
import android.os.Build
import android.os.Bundle
import android.view.KeyEvent
import android.view.View
......@@ -10,17 +9,15 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentTransaction
import com.ireader.ireadersdk.IreaderApi
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.R
import com.mints.goodmoney.ad.video.VedioAdingManager
import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.TTPreLoadCarrierExpressManager
import com.mints.goodmoney.manager.ZhangyueManager
import com.mints.goodmoney.mvp.views.MainView
import com.mints.goodmoney.ui.activitys.base.BaseActivity
import com.mints.goodmoney.ui.fragment.*
import com.mints.goodmoney.utils.LogUtil
import com.mints.goodmoney.utils.SimUtils
import kotlinx.android.synthetic.main.activity_main.*
/**
......@@ -74,6 +71,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
super.onDestroy()
TTPreLoadCarrierExpressManager.getInstance().onDestroy()
VedioAdingManager.getInstance(this).setVedioAdingListener(null)
VedioAdingManager.getInstance(this).onDestory()
}
......@@ -158,7 +156,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
public fun clickTab2Layout() {
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_CHANNEL
if (channelFragment == null) {
channelFragment = HorizChannelFragment()
channelFragment = HorizonChannelFragment()
}
addOrShowFragment(supportFragmentManager, channelFragment!!, Constant.FRAGMENT_TAG_CHANNEL)
tab_iv_main.isSelected = false
......
......@@ -5,8 +5,11 @@ import android.os.Handler
import android.os.Looper
import android.text.TextUtils
import android.view.View
import android.widget.LinearLayout
import androidx.fragment.app.FragmentTransaction
import com.bytedance.hume.readapk.HumeSDK
import com.daimajia.androidanimations.library.Techniques
import com.daimajia.androidanimations.library.YoYo
import com.daimajia.androidanimations.library.YoYo.YoYoString
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.R
import com.mints.goodmoney.ad.video.VedioAdingManager
......@@ -26,14 +29,19 @@ import com.mints.goodmoney.ui.fragment.base.BaseFragment
import com.mints.goodmoney.ui.widgets.BindWxDialog
import com.mints.goodmoney.ui.widgets.DialogListener
import com.mints.goodmoney.ui.widgets.PowerDialog
import com.mints.goodmoney.ui.widgets.countdowntimer.CountDownTimerSupport
import com.mints.goodmoney.ui.widgets.countdowntimer.OnCountDownTimerListener
import com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils
import com.mints.goodmoney.utils.LogUtil
import com.mints.goodmoney.utils.TimeRender
import com.mints.library.utils.CommonUtils
import com.yilan.sdk.player.ylplayer.YLPlayerConfig
import com.yilan.sdk.player.ylplayer.callback.OnPlayerCallBack
import com.yilan.sdk.ui.configs.YLUIConfig
import com.yilan.sdk.ui.little.YLLittleVideoFragment
import com.yilan.sdk.ylad.YLAdListener
import kotlinx.android.synthetic.main.fragment_main_first.*
import kotlinx.android.synthetic.main.layout_red_bag.*
import kotlinx.android.synthetic.main.layout_red_box.*
import net.grandcentrix.tray.AppPreferences
/**
......@@ -68,6 +76,12 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 广告权重相关
private var vedioAdingManager: VedioAdingManager? = null
// 福袋相关
private var rope: YoYoString? = null
private var mRedBoxTimer: CountDownTimerSupport? = null
private var mRedBoxCoin = 0
private var mRedBoxCoinDouble = 0
override fun getContentViewLayoutID() = R.layout.fragment_main_first
override fun initViewsAndEvents() {
......@@ -76,8 +90,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
vedioAdingManager = VedioAdingManager.getInstance(activity)
// 奖励页预加载 信息流广告
TTPreLoadExpressManager.getInstance().loadTtFrameLayout()
// 喝水页预加载 信息流广告
// TTPreLoadCarrierExpressManager.getInstance().init()
// 首次显示权限弹窗
showPowerDialog()
......@@ -100,6 +112,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
override fun onResume() {
super.onResume()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_MAIN) {
// 打开激活
uploadDeviceInfo()
......@@ -136,6 +149,9 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_MAIN) {
YLPlayerConfig.config().unRegisterPlayerCallback()
}
// 福袋动画停止
stopRedbox()
// 倒计时红包暂停
pauseDownloadTime()
littleVideoFragment?.onPause()
......@@ -154,6 +170,11 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
}
override fun onDestroyView() {
if (rope != null) {
rope?.stop()
rope = null
}
cdvvYilanTime?.onDestory()
cdvvYilanTime?.setCountDownVedioListener(null)
super.onDestroyView()
......@@ -190,6 +211,20 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 手机号登录未绑定微信 弹出界面不能关闭
loginMobileBindWx()
data.blessingBigMsgBean?.let {
if (it.surplusCount > 0) {
if (rl_fragment_main_redbox.visibility == View.GONE) {
rl_fragment_main_redbox.visibility = View.VISIBLE
}
mRedBoxCoin = it.coin
mRedBoxCoinDouble = it.doubleCoin
startTimer(it.surplusSeconds.toLong())
} else {
stopRedbox()
rl_fragment_main_redbox.visibility = View.GONE
}
}
}
override fun getHomeVedioMsgSuc(data: MainVedioMsgBean) {
......@@ -219,6 +254,13 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
override fun onClick(v: View) {
when (v.id) {
R.id.rl_fragment_main_redbox -> {
val bundle = Bundle()
bundle.putInt(Constant.MAIN_CUR_COIN, mRedBoxCoin)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_BLESSINGBAG)
bundle.putString(Constant.MAIN_EXTRA_ID, mRedBoxCoinDouble.toString())
readyGo(AwardActivity::class.java, bundle)
}
R.id.cdvvYilanTime -> {
// 视频已转满 且 服务返回可以领奖励
if (isAward && isToCreateReward) {
......@@ -260,7 +302,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
transaction.show(littleVideoFragment!!)
}
transaction.commitAllowingStateLoss()
}
private fun registerPlayerCallBack() {
......@@ -271,18 +312,15 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
isFirstLoadVedio = false
initTimeview()
} else {
// LogUtil.d(TAG, "registerPlayerCallBack onStart")
resumeDownloadTime(videoid)
}
}
override fun onPause(pager: String, p1: String?, p2: String?) {
// LogUtil.d(TAG, "registerPlayerCallBack onPause")
pauseDownloadTime()
}
override fun onResume(pager: String, videoid: String, p2: String?) {
// LogUtil.d(TAG, "registerPlayerCallBack onResume")
resumeDownloadTime(videoid)
}
......@@ -315,7 +353,11 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
}
private fun initListener() {
val params = LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT)
params.setMargins(0, 0, 0, BubbleUtils.dp2px(270))
cdvvYilanTime.layoutParams = params
cdvvYilanTime.setOnClickListener(this)
rl_fragment_main_redbox.setOnClickListener(this)
// 广告回调
YLUIConfig.getInstance().registerAdListener(object : YLAdListener {
......@@ -418,9 +460,9 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
cdvvYilanTime?.setCountDownVedioListener {
if (isFirstWatchVideo) {
// 第一次观看完视频提醒用户
val vs = vs_tips.inflate()
vs_tips.visibility = View.VISIBLE
Handler(Looper.getMainLooper()).postDelayed({
vs.visibility = View.GONE
vs_tips.visibility = View.GONE
}, 3000)
isFirstWatchVideo = false
}
......@@ -520,4 +562,57 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
}
}
}
/**
* 显示福袋动画
*/
fun showRedbox(view: View?) {
rope = null
rope = YoYo.with(Techniques.Tada).duration(1000).repeat(-1).playOn(view)
}
/**
* 暂停福袋动画
*/
fun stopRedbox() {
if (rope != null && rope!!.isRunning) {
rope?.stop()
}
}
/**
* 开始福袋定时器
*/
private fun startTimer(time: Long) {
if (time > 0) {
if (rl_fragment_main_redbox.visibility != View.VISIBLE) {
rl_fragment_main_redbox.visibility = View.VISIBLE
}
stopRedbox()
mRedBoxTimer = CountDownTimerSupport(time * 1000, 1000)
rl_fragment_main_redbox.isClickable = false
mRedBoxTimer?.setOnCountDownTimerListener(object : OnCountDownTimerListener {
override fun onTick(millisUntilFinished: Long) {
if (!requireActivity().isFinishing) {
tv_fragment_main_redbox.text = TimeRender.ms2HMS(millisUntilFinished.toInt())
}
}
override fun onFinish() {
if (!requireActivity().isFinishing) {
tv_fragment_main_redbox.text = "可拆开"
rl_fragment_main_redbox.isClickable = true
showRedbox(rl_fragment_main_redbox)
}
}
})
mRedBoxTimer?.start()
} else {
tv_fragment_main_redbox.text = "可拆开"
rl_fragment_main_redbox.isClickable = true
showRedbox(rl_fragment_main_redbox)
}
}
}
\ No newline at end of file
......@@ -4,8 +4,6 @@ import androidx.fragment.app.Fragment
import androidx.viewpager.widget.ViewPager
import com.androidkun.xtablayout.XTabLayout
import com.mints.goodmoney.R
import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.ui.activitys.WxLoginActivity
import com.mints.goodmoney.ui.adapter.MessageFragAdapter
import com.mints.goodmoney.ui.fragment.base.BaseFragment
import kotlinx.android.synthetic.main.fragment_main_money.*
......
......@@ -2,7 +2,6 @@ package com.mints.goodmoney.ui.fragment
import android.os.Bundle
import com.mints.goodmoney.R
import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.mvp.presenters.RsNewsPresenter
import com.mints.goodmoney.mvp.views.RsNewsView
......@@ -36,7 +35,7 @@ class RsNewsFragment : LazyLoadBaseFragment(), RsNewsView, FinishReadNewsCallBac
}
override fun readSecondsSuc(coin: Int, video: Int, supr: Int) {
if (activity != null && !activity!!.isFinishing() && coin > 0 && supr > 0) {
if (activity != null && !activity!!.isFinishing && coin > 0 && supr > 0) {
val bundle = Bundle()
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_RUISHINEWS)
bundle.putInt(Constant.MAIN_CUR_COIN, coin)
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#8F2312" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="14dip" />
</shape>
\ No newline at end of file
......@@ -9,40 +9,8 @@
android:layout_height="match_parent"
android:paddingTop="32dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_marginEnd="8dp"
android:orientation="horizontal">
<include layout="@layout/layout_red_bag" />
<ViewStub
android:id="@+id/vs_tips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout="@layout/layout_watchvideo_tips" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:orientation="vertical">
<ImageView
android:id="@+id/ivMainBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="20dp"
android:src="@mipmap/ic_main_box"
android:visibility="gone" />
<com.mints.goodmoney.ui.widgets.CountDownVedioView
android:id="@+id/cdvvYilanTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="30dp" />
</LinearLayout>
</LinearLayout>
<include layout="@layout/layout_red_box" />
</FrameLayout>
\ No newline at end of file
......@@ -8,39 +8,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_marginEnd="4dp"
android:orientation="horizontal">
<include layout="@layout/layout_red_bag" />
<ViewStub
android:id="@+id/vs_tips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout="@layout/layout_watchvideo_tips" />
<include layout="@layout/layout_red_box" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:orientation="vertical">
<ImageView
android:id="@+id/ivMainBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="20dp"
android:src="@mipmap/ic_main_box"
android:visibility="gone" />
<com.mints.goodmoney.ui.widgets.CountDownVedioView
android:id="@+id/cdvvYilanTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="270dp" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rl_fragment_main_redbox"
android:layout_width="75dp"
android:layout_height="75dp"
android:layout_gravity="end"
android:layout_marginTop="100dp"
android:layout_marginEnd="10dp"
android:background="@mipmap/ic_main_redbox">
<TextView
android:id="@+id/tv_fragment_main_redbox"
android:layout_width="wrap_content"
android:layout_height="12dp"
android:layout_gravity="center|bottom"
android:layout_marginBottom="10dp"
android:background="@drawable/shape_redbox_red"
android:gravity="center"
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:text="可拆开"
android:textColor="@color/color_F28335"
android:textSize="6sp" />
</FrameLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_marginEnd="4dp">
<TextView
android:id="@+id/vs_tips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_tips"
android:elevation="2dp"
android:padding="5dp"
android:text="点击红包可以领取金币哦~"
android:textColor="@color/white"
android:textSize="14sp"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/linearLayout3"
app:layout_constraintEnd_toStartOf="@+id/linearLayout3" />
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@id/vs_tips">
<ImageView
android:id="@+id/ivMainBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="20dp"
android:src="@mipmap/ic_main_box"
android:visibility="gone" />
<com.mints.goodmoney.ui.widgets.CountDownVedioView
android:id="@+id/cdvvYilanTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_tips"
android:elevation="2dp"
android:padding="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="点击红包可以领取金币哦~"
android:textColor="@color/white"
android:textSize="14sp" />
</FrameLayout>
\ No newline at end of file
android:padding="5dp"
android:text="点击红包可以领取金币哦~"
android:textColor="@color/white"
android:textSize="14sp" />
......@@ -62,4 +62,5 @@
<color name="color_E1B867">#E1B867</color>
<color name="color_FCCCAC">#FCCCAC</color>
<color name="color_994B23">#994B23</color>
<color name="color_F28335">#F28335</color>
</resources>
\ No newline at end of file
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