Commit 93a4e04d authored by mengcuiguang's avatar mengcuiguang

代码优化

parent e6ac82fb
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
<!-- </activity>--> <!-- </activity>-->
<activity <activity
android:name=".ui.activitys.SplashYlhActivity" android:name=".ui.activitys.SplashActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/NormalSplash"> android:theme="@style/NormalSplash">
<intent-filter> <intent-filter>
......
...@@ -34,62 +34,63 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -34,62 +34,63 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
// 底部标签切换的Fragment // 底部标签切换的Fragment
private var moneyFragment: Fragment? = null private var moneyFragment: Fragment? = null
private var turnTableFragment: Fragment? = null private var panFragment: Fragment? = null
private var friendsFragment: Fragment? = null private var friendsFragment: Fragment? = null
private var myFragment: Fragment? = null private var myFragment: Fragment? = null
private var channelFragment: Fragment? = null private var channelFragment: Fragment? = null
private var kuYinyueFragment: Fragment? = null private var kuYinyueFragment: Fragment? = null
private var idiomFragment: Fragment? = null private var idiomFragment: Fragment? = null
private var wzFragment: Fragment? = null private var foodSubsidyFragment: Fragment? = null
private var currentFragment: Fragment? = null private var currentFragment: Fragment? = null
private var mainFriendsStatus: Int = 0// 0-平台分红 1-微转 2-猜成语,防止线程不一样 private var isMainShowWz: Boolean = false// 是否显示来电秀,防止线程不一样
override fun getContentViewLayoutID() = R.layout.activity_main override fun getContentViewLayoutID() = R.layout.activity_main
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
showShortVedioLayout()
if (moneyFragment == null) { // ZhangyueManager.onCreateIreader(baseApplication)
moneyFragment = MoneyFragment() // MokuManager.init(this)
// showShortVedioLayout()
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_FIVE
if (myFragment == null) {
myFragment = MyFragment()
} }
if (!moneyFragment!!.isAdded) { if (!myFragment!!.isAdded) {
// 提交事务 // 提交事务
supportFragmentManager.beginTransaction() supportFragmentManager.beginTransaction()
.add(R.id.content_layout, moneyFragment!!).commitAllowingStateLoss() .add(R.id.content_layout, myFragment!!).commitAllowingStateLoss()
// 记录当前Fragment // 记录当前Fragment
currentFragment = moneyFragment currentFragment = myFragment
} }
mainFriendsStatus=AppConfig.mainFriendsStatus
// 0-平台分红 1-微转 2-猜成语,防止线程不一样
when (mainFriendsStatus) {
0 -> {
tab_iv_four.setImageResource(R.drawable.tab_friends_btn)
tab_tv_four.text = "平台分红"
mainFriendsStatus = 0
}
1 -> {
tab_iv_four.setImageResource(R.drawable.tab_friends_btn)
tab_tv_four.text = "分享"
mainFriendsStatus = 1
}
2 -> {
tab_iv_four.setImageResource(R.drawable.tab_wz_share_btn)
tab_tv_four.text = "猜成语"
mainFriendsStatus = 2
}
}
tab_iv_one.isSelected = true
tab_tv_one.isSelected = true
tab_rl_one.setOnClickListener(this) tab_rl_five.isSelected = true
tab_rl_three.setOnClickListener(this) tab_iv_four.setImageResource(R.drawable.tab_friends_btn)
tab_rl_two.setOnClickListener(this) tab_tv_four.text = "饭补"
// if (AppConfig.isMainShowWz) {
// tab_iv_four.setImageResource(R.drawable.tab_wz_share_btn)
// tab_tv_four.text = "猜成语"
// isMainShowWz = true
// } else {
// tab_iv_four.setImageResource(R.drawable.tab_friends_btn)
// tab_tv_four.text = "平台分红"
// isMainShowWz = false
// }
// tab_iv_one.isSelected = true
// tab_tv_one.isSelected = true
//
// tab_rl_one.setOnClickListener(this)
// tab_rl_three.setOnClickListener(this)
// tab_rl_two.setOnClickListener(this)
tab_rl_four.setOnClickListener(this) tab_rl_four.setOnClickListener(this)
tab_rl_five.setOnClickListener(this) tab_rl_five.setOnClickListener(this)
} }
...@@ -97,6 +98,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -97,6 +98,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override fun isApplyKitKatTranslucency() = false override fun isApplyKitKatTranslucency() = false
public override fun onDestroy() { public override fun onDestroy() {
super.onDestroy() super.onDestroy()
TTPreLoadCarrierExpressManager.getInstance().onDestroy() TTPreLoadCarrierExpressManager.getInstance().onDestroy()
...@@ -136,10 +138,10 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -136,10 +138,10 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override fun onClick(view: View) { override fun onClick(view: View) {
when (view.id) { when (view.id) {
R.id.tab_rl_one -> clickTab1Layout() // R.id.tab_rl_one -> clickTab1Layout()
R.id.tab_rl_two -> clickTab2Layout() // R.id.tab_rl_two -> clickTab2Layout()
R.id.tab_rl_four -> clickTab4Layout() R.id.tab_rl_four -> clickTab4Layout()
R.id.tab_rl_three -> clickTab3Layout() // R.id.tab_rl_three -> clickTab3Layout()
R.id.tab_rl_five -> clickTab5Layout() R.id.tab_rl_five -> clickTab5Layout()
} }
} }
...@@ -154,10 +156,10 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -154,10 +156,10 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
} }
addOrShowFragment(supportFragmentManager, moneyFragment!!, Constant.FRAGMENT_TAG_ONE) addOrShowFragment(supportFragmentManager, moneyFragment!!, Constant.FRAGMENT_TAG_ONE)
tab_iv_one.isSelected = true // tab_iv_one.isSelected = true
tab_tv_one.isSelected = true // tab_tv_one.isSelected = true
tab_iv_two.isSelected = false // tab_iv_two.isSelected = false
tab_tv_two.isSelected = false // tab_tv_two.isSelected = false
// tab_iv_three.isSelected = false // tab_iv_three.isSelected = false
// tab_tv_three.isSelected = false // tab_tv_three.isSelected = false
tab_iv_four.isSelected = false tab_iv_four.isSelected = false
...@@ -200,10 +202,10 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -200,10 +202,10 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
channelFragment = HorizonChannelFragment() channelFragment = HorizonChannelFragment()
} }
addOrShowFragment(supportFragmentManager, channelFragment!!, Constant.FRAGMENT_TAG_TWO) addOrShowFragment(supportFragmentManager, channelFragment!!, Constant.FRAGMENT_TAG_TWO)
tab_iv_one.isSelected = false // tab_iv_one.isSelected = false
tab_tv_one.isSelected = false // tab_tv_one.isSelected = false
tab_iv_two.isSelected = true // tab_iv_two.isSelected = true
tab_tv_two.isSelected = true // tab_tv_two.isSelected = true
// tab_iv_three.isSelected = false // tab_iv_three.isSelected = false
// tab_tv_three.isSelected = false // tab_tv_three.isSelected = false
tab_iv_four.isSelected = false tab_iv_four.isSelected = false
...@@ -217,45 +219,65 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -217,45 +219,65 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
* 点击第四个tab * 点击第四个tab
*/ */
fun clickTab4Layout() { fun clickTab4Layout() {
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_FOUR
// 0-平台分红 1-微转 2-猜成语,防止线程不一样
when (mainFriendsStatus) {
0 -> {
if (friendsFragment == null) {
friendsFragment = FriendsFragment()
}
addOrShowFragment(supportFragmentManager, friendsFragment!!, Constant.FRAGMENT_TAG_FOUR)
}
1 -> {
if (wzFragment == null) {
wzFragment = WzFragment()
}
addOrShowFragment(supportFragmentManager, wzFragment!!, Constant.FRAGMENT_TAG_FOUR)
}
2 -> {
if (!AppConfig.scene_flag) {
SceneManager.signIn(this)
}
if (TextUtils.isEmpty(UserManager.getInstance().userID)) { // 猜成语
showToast("请先登录账号") AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_FOUR
return if (foodSubsidyFragment == null) {
} foodSubsidyFragment = FoodSubsidyFragment()
// 猜成语
if (idiomFragment == null) {
idiomFragment = SceneIdiomFragment()
}
addOrShowFragment(supportFragmentManager, idiomFragment!!, Constant.FRAGMENT_TAG_FOUR)
}
} }
tab_iv_one.isSelected = false addOrShowFragment(supportFragmentManager, foodSubsidyFragment!!, Constant.FRAGMENT_TAG_FOUR)
tab_tv_one.isSelected = false
tab_iv_two.isSelected = false // tab_iv_one.isSelected = false
tab_tv_two.isSelected = false // tab_tv_one.isSelected = false
// tab_iv_two.isSelected = false
// tab_tv_two.isSelected = false
tab_iv_four.isSelected = true tab_iv_four.isSelected = true
tab_tv_four.isSelected = true tab_tv_four.isSelected = true
tab_iv_five.isSelected = false tab_iv_five.isSelected = false
tab_tv_five.isSelected = false tab_tv_five.isSelected = false
// 是否显示微转
// if (isMainShowWz) {
//// if (!AppConfig.scene_flag) {
//// SceneManager.signIn(this)
//// }
//
// if (TextUtils.isEmpty(UserManager.getInstance().userID)) {
// showToast("请先登录账号")
// return
// }
//
// // 猜成语
// AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_FOUR
// if (idiomFragment == null) {
// idiomFragment = SceneIdiomFragment()
// }
// addOrShowFragment(supportFragmentManager, idiomFragment!!, Constant.FRAGMENT_TAG_FOUR)
//
//// tab_iv_one.isSelected = false
//// tab_tv_one.isSelected = false
//// tab_iv_two.isSelected = false
//// tab_tv_two.isSelected = false
// tab_iv_four.isSelected = true
// tab_tv_four.isSelected = true
// tab_iv_five.isSelected = false
// tab_tv_five.isSelected = false
// } else {
// AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_FOUR
// if (friendsFragment == null) {
// friendsFragment = FriendsFragment()
// }
// addOrShowFragment(supportFragmentManager, friendsFragment!!, Constant.FRAGMENT_TAG_FOUR)
//
//// tab_iv_one.isSelected = false
//// tab_tv_one.isSelected = false
//// tab_iv_two.isSelected = false
//// tab_tv_two.isSelected = false
// tab_iv_four.isSelected = true
// tab_tv_four.isSelected = true
// tab_iv_five.isSelected = false
// tab_tv_five.isSelected = false
// }
} }
/** /**
...@@ -263,14 +285,14 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -263,14 +285,14 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
*/ */
private fun clickTab3Layout() { private fun clickTab3Layout() {
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_THREE AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_THREE
if (turnTableFragment == null) { if (panFragment == null) {
turnTableFragment = TurnTableFragment() panFragment = PanFragment()
} }
addOrShowFragment(supportFragmentManager, turnTableFragment!!, Constant.FRAGMENT_TAG_THREE) addOrShowFragment(supportFragmentManager, panFragment!!, Constant.FRAGMENT_TAG_THREE)
tab_iv_one.isSelected = false // tab_iv_one.isSelected = false
tab_tv_one.isSelected = false // tab_tv_one.isSelected = false
tab_iv_two.isSelected = false // tab_iv_two.isSelected = false
tab_tv_two.isSelected = false // tab_tv_two.isSelected = false
// tab_iv_three.isSelected = true // tab_iv_three.isSelected = true
// tab_tv_three.isSelected = true // tab_tv_three.isSelected = true
tab_iv_four.isSelected = false tab_iv_four.isSelected = false
...@@ -288,10 +310,10 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -288,10 +310,10 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
myFragment = MyFragment() myFragment = MyFragment()
} }
addOrShowFragment(supportFragmentManager, myFragment!!, Constant.FRAGMENT_TAG_FIVE) addOrShowFragment(supportFragmentManager, myFragment!!, Constant.FRAGMENT_TAG_FIVE)
tab_iv_one.isSelected = false // tab_iv_one.isSelected = false
tab_tv_one.isSelected = false // tab_tv_one.isSelected = false
tab_iv_two.isSelected = false // tab_iv_two.isSelected = false
tab_tv_two.isSelected = false // tab_tv_two.isSelected = false
// tab_iv_three.isSelected = false // tab_iv_three.isSelected = false
// tab_tv_three.isSelected = false // tab_tv_three.isSelected = false
tab_iv_four.isSelected = false tab_iv_four.isSelected = false
...@@ -320,10 +342,10 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -320,10 +342,10 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
} }
fun showShortVedioLayout() { fun showShortVedioLayout() {
if (AppConfig.showAdFlag) { // if (AppConfig.showAdFlag) {
tab_rl_two.visibility = View.VISIBLE // tab_rl_two.visibility = View.VISIBLE
} else { // } else {
tab_rl_two.visibility = View.GONE // tab_rl_two.visibility = View.GONE
} // }
} }
} }
\ No newline at end of file
package com.mints.goodmoney.ui.fragment
import android.os.Bundle
import com.mints.goodmoney.R
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.mvp.model.MealBean
import com.mints.goodmoney.mvp.presenters.FoodSubsidyPresenter
import com.mints.goodmoney.mvp.views.FoodSubsidyView
import com.mints.goodmoney.ui.activitys.AwardActivity
import com.mints.goodmoney.ui.fragment.base.BaseFragment
import com.mints.goodmoney.ui.widgets.MealView
import com.mints.goodmoney.ui.widgets.StepView
import kotlinx.android.synthetic.main.fragment_food_subsidy.*
class FoodSubsidyFragment : BaseFragment(), FoodSubsidyView, StepView.StepViewListener, MealView.MealViewListener {
private val foodSubsidyPresenter by lazy { FoodSubsidyPresenter() }
private var curCoin = 0//点击的汽泡金币
private var buttonCoin = 0//点击的汽泡金币
private var isCanClickVideo = false
override fun getContentViewLayoutID() = R.layout.fragment_food_subsidy
override fun initViewsAndEvents() {
foodSubsidyPresenter.attachView(this)
initListener()
}
override fun onResume() {
super.onResume()
// initExpress()
foodSubsidyPresenter.getMealMsg()
}
override fun onDestroy() {
super.onDestroy()
svWalk?.destoryAnim()
// flSubsidykAd?.removeAllViews()
foodSubsidyPresenter.detachView()
}
private fun initListener() {
svWalk.setMealViewListener(this)
}
override fun clickWater(water: Int, waterCoin: String) {
if (water == 0) {
val bundle = Bundle()
bundle.putInt(Constant.MAIN_CUR_COIN, buttonCoin)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_EATMEAL)
readyGo(AwardActivity::class.java, bundle)
} else {
if (isCanClickVideo) {
val bundle = Bundle()
bundle.putInt(Constant.MAIN_CUR_COIN, curCoin)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_EATMEAL_SUBSIDY)
readyGo(AwardActivity::class.java, bundle)
svWalk.setCancelAnim(water)
} else {
val bundle = Bundle()
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_EATMEAL_SUBSIDY_NOT)
readyGo(AwardActivity::class.java, bundle)
}
}
// 预加载信息流
// TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_EAT)
}
/**
* 初始化信息iyc
*/
private fun initExpress() {
// try {
// if (TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout != null) {
// if (flSubsidykAd != null) {
// flSubsidykAd.removeAllViews()
// flSubsidykAd.addView(TTPreLoadCarrierExpressManager.getInstance().ttFrameLayout)
// }
// }
// } catch (e: Exception) {
// e.printStackTrace()
// }
}
override fun getFoodSubsidySuc(data: MealBean) {
svWalk.setThreeBtnGone()
curCoin = data.vedioCoin
buttonCoin = data.buttonCoin
this.isCanClickVideo = data.isCanClickVedio
for (i in 0 until data.vedioCount) {
svWalk.setWaterTextviewLayout(i + 1, 0)
}
// 是否可领取奖励
if (data.isCanClickButton) {
svWalk.setTvDrinkBtnEnable()
} else {
svWalk.setTvDrinkBtnNone()
}
svWalk.setTvDrinkBtnText(data.buttonMsg)
}
}
\ No newline at end of file
...@@ -9,6 +9,7 @@ import android.content.Intent ...@@ -9,6 +9,7 @@ import android.content.Intent
import android.content.IntentFilter import android.content.IntentFilter
import android.os.Bundle import android.os.Bundle
import android.text.TextUtils import android.text.TextUtils
import android.view.Gravity
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.widget.AdapterView import android.widget.AdapterView
...@@ -41,8 +42,10 @@ import com.mints.goodmoney.ui.adapter.ViewPagerAdapter ...@@ -41,8 +42,10 @@ import com.mints.goodmoney.ui.adapter.ViewPagerAdapter
import com.mints.goodmoney.ui.adapter.listener.OnItemChildClickListener import com.mints.goodmoney.ui.adapter.listener.OnItemChildClickListener
import com.mints.goodmoney.ui.fragment.base.BaseFragment import com.mints.goodmoney.ui.fragment.base.BaseFragment
import com.mints.goodmoney.ui.widgets.ShareDialog import com.mints.goodmoney.ui.widgets.ShareDialog
import com.mints.goodmoney.ui.widgets.dialog.CustomDialogAsApple
import com.mints.goodmoney.ui.widgets.dialog.DialogListener import com.mints.goodmoney.ui.widgets.dialog.DialogListener
import com.mints.goodmoney.ui.widgets.dialog.DialogUtils import com.mints.goodmoney.ui.widgets.dialog.DialogUtils
import com.mints.goodmoney.ui.widgets.dialog.PowerDialog
import com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils import com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils
import com.mints.goodmoney.utils.* import com.mints.goodmoney.utils.*
import com.mints.library.net.netstatus.NetUtils import com.mints.library.net.netstatus.NetUtils
...@@ -79,17 +82,21 @@ class MyFragment : BaseFragment(), ...@@ -79,17 +82,21 @@ class MyFragment : BaseFragment(),
OnItemChildClickListener, OnItemChildClickListener,
OnRefreshListener, OnRefreshListener,
View.OnClickListener, View.OnClickListener,
AdapterView.OnItemClickListener, AdBannerAdapter.OnPageClickListener { AdapterView.OnItemClickListener {
private val ps by lazy { AppPreferences(context) }
private val myPresenter by lazy { MyPresenter() }
private val userManager by lazy { UserManager.getInstance() }
private lateinit var vedioAdingManager: VideoAdingManager
private var loadVedioFailCount = 0
companion object { companion object {
// 热门活动每页展示数据
const val HOT_PAGE_SIZE = 8 const val HOT_PAGE_SIZE = 8
} }
private val ps by lazy { AppPreferences(context) } // 热门活动下标
private val myPresenter by lazy { MyPresenter() } private var mCurrentIndex = 0
private val userManager by lazy { UserManager.getInstance() }
private lateinit var videoAdingManager: VideoAdingManager
private var loadVideoFailCount = 0
private var userConfig: MyInfo? = null private var userConfig: MyInfo? = null
private val hotList: MutableList<BannerBean.ListBean> = mutableListOf() private val hotList: MutableList<BannerBean.ListBean> = mutableListOf()
...@@ -108,18 +115,15 @@ class MyFragment : BaseFragment(), ...@@ -108,18 +115,15 @@ class MyFragment : BaseFragment(),
// 任务数据 // 任务数据
private val dataList: MutableList<MyInfo.AutoListBean> = mutableListOf() private val dataList: MutableList<MyInfo.AutoListBean> = mutableListOf()
private var mainMyAdapter: MainMyAdapter? = null // private var mainMyAdapter: MainMyAdapter? = null
// Banner
private var mAdBannerAdapter: AdBannerAdapter? = null
private var mBannerData: RotationChartBean? = null
// 高额任务 // 高额任务
private var mCurrentPkg: String? = null private var mCurrentPkg: String? = null
private var mReceiverBroadcastReceiver: BroadcastReceiver? = null private var mReceiverBroadcastReceiver: BroadcastReceiver? = null
// 热门活动下标 private var cdaa: CustomDialogAsApple? = null
private var mCurrentIndex = 0
private var powerDialog: PowerDialog? = null
override fun getContentViewLayoutID() = R.layout.fragment_main_my override fun getContentViewLayoutID() = R.layout.fragment_main_my
...@@ -127,12 +131,13 @@ class MyFragment : BaseFragment(), ...@@ -127,12 +131,13 @@ class MyFragment : BaseFragment(),
myPresenter.attachView(this) myPresenter.attachView(this)
srl_my.setOnRefreshListener(this) srl_my.setOnRefreshListener(this)
showPowerDialog()
initManager() initManager()
initView() initView()
initRecy() // initRecy()
} }
override fun onHiddenChanged(hidden: Boolean) { override fun onHiddenChanged(hidden: Boolean) {
if (hidden) { // 不在最前端界面显示 if (hidden) { // 不在最前端界面显示
onPause() onPause()
...@@ -144,48 +149,47 @@ class MyFragment : BaseFragment(), ...@@ -144,48 +149,47 @@ class MyFragment : BaseFragment(),
override fun onPause() { override fun onPause() {
super.onPause() super.onPause()
banner_view.stopAutoScroll()
item_clock_signview.stopRedbox() item_clock_signview.stopRedbox()
} }
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_FIVE) { if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_FIVE) {
DownloadApkManager.tryOnceInstallApk()
if (!TextUtils.isEmpty(userManager.userID)) { if (!TextUtils.isEmpty(userManager.userID)) {
myPresenter.getAutoUserHallBaseMsg() myPresenter.getAutoUserHallBaseMsg()
refreshHighTask() // refreshHighTask()
} else { } else {
// 游客登录 // 游客登录
myPresenter.userLogin() myPresenter.userLogin()
} }
// 防止banner刷新太快
// if (AntiShake.check(fl_my_banner?.id)) return
// BannerManager.getTtBanner(TtCsjAdManager.TT_AD_BANNER_MY, fl_my_banner)
// 刷新喜马拉雅信息流 // 刷新喜马拉雅信息流
TTPreLoadExpressXmlyManager.getInstance().loadTtFrameLayout() // TTPreLoadExpressXmlyManager.getInstance().loadTtFrameLayout()
} }
} }
/** /**
* 刷新高额任务 * 刷新高额任务
*/ */
private fun refreshHighTask() { // private fun refreshHighTask() {
if (AppConfig.isHighTask && mCurrentPkg != null) { // if (AppConfig.isHighTask && mCurrentPkg != null) {
if (AppTryPlayManager.getTryPlayIsOK(mCurrentPkg!!, 30)) { // if (AppTryPlayManager.getTryPlayIsOK(mCurrentPkg!!, 30)) {
myPresenter.setHighTaskType(Constant.CARRIER_HIGH_ACTIVITY, "1") // myPresenter.setHighTaskType(Constant.CARRIER_HIGH_ACTIVITY, "1")
} else { // } else {
val bundle = Bundle() // val bundle = Bundle()
bundle.putInt(Constant.MAIN_CUR_COIN, 0) // bundle.putInt(Constant.MAIN_CUR_COIN, 0)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_HIGH_ACTIVITY) // bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_HIGH_ACTIVITY)
readyGo(AwardActivity::class.java, bundle) // readyGo(AwardActivity::class.java, bundle)
//
myPresenter.setHighTaskType(Constant.CARRIER_HIGH_ACTIVITY, "0") // myPresenter.setHighTaskType(Constant.CARRIER_HIGH_ACTIVITY, "0")
} // }
AppConfig.isHighTask = false // AppConfig.isHighTask = false
} // }
} // }
override fun onDestroyView() { override fun onDestroyView() {
item_clock_signview.onDestory() item_clock_signview.onDestory()
...@@ -194,8 +198,7 @@ class MyFragment : BaseFragment(), ...@@ -194,8 +198,7 @@ class MyFragment : BaseFragment(),
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
fl_my_banner?.removeAllViews() // fl_my_banner?.removeAllViews()
BxmManager.onDestory()
BannerManager.onDestroy() BannerManager.onDestroy()
myPresenter.detachView() myPresenter.detachView()
...@@ -211,12 +214,11 @@ class MyFragment : BaseFragment(), ...@@ -211,12 +214,11 @@ class MyFragment : BaseFragment(),
} }
myPresenter.getSignInHomePageMsg() myPresenter.getSignInHomePageMsg()
myPresenter.myHotActivity() // myPresenter.myHotActivity()
myPresenter.getHallBaseMsg() // myPresenter.getHallBaseMsg()
myPresenter.myRotationChart()
userConfig = data userConfig = data
handleRecyData() // handleRecyData()
setUserLoginStatus() setUserLoginStatus()
} }
...@@ -269,11 +271,9 @@ class MyFragment : BaseFragment(), ...@@ -269,11 +271,9 @@ class MyFragment : BaseFragment(),
piv_grid.setAnimationType(AnimationType.THIN_WORM) piv_grid.setAnimationType(AnimationType.THIN_WORM)
vp_grid.adapter = ViewPagerAdapter(pagerList) vp_grid.adapter = ViewPagerAdapter(pagerList)
// vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener { // vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
// override fun onPageScrollStateChanged(state: Int) { // override fun onPageScrollStateChanged(state: Int) {}
// }
// //
// override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { // override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {}
// }
// //
// override fun onPageSelected(position: Int) { // override fun onPageSelected(position: Int) {
// mCurrentIndex = position // mCurrentIndex = position
...@@ -296,14 +296,15 @@ class MyFragment : BaseFragment(), ...@@ -296,14 +296,15 @@ class MyFragment : BaseFragment(),
} }
override fun signInHomePageSuc() { override fun signInHomePageSuc() {
val bundle = Bundle() // val bundle = Bundle()
bundle.putInt(Constant.MAIN_CUR_COIN, curSignCoin) // bundle.putInt(Constant.MAIN_CUR_COIN, curSignCoin)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_SIGNIN_HOMEPAGE_AWARD) // bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_SIGNIN_HOMEPAGE_AWARD)
readyGo(AwardActivity::class.java, bundle) // readyGo(AwardActivity::class.java, bundle)
} }
override fun userLoginSuc() { override fun userLoginSuc() {
SceneManager.signIn(requireActivity()) // SceneManager.signIn(requireActivity())
RsNewsManager.init(baseApplication)
myPresenter.getAutoUserHallBaseMsg() myPresenter.getAutoUserHallBaseMsg()
myPresenter.getHallBaseMsg() myPresenter.getHallBaseMsg()
...@@ -320,7 +321,9 @@ class MyFragment : BaseFragment(), ...@@ -320,7 +321,9 @@ class MyFragment : BaseFragment(),
// 更新权重 // 更新权重
initAdWeight(data) initAdWeight(data)
initExpress(data.flowAdRules) initExpress(data.flowAdRules)
AppConfig.app_black_name = data.userRiskApps.userRiskAppName AppConfig.app_black_name = data.userRiskApps.userRiskAppName
AppConfig.app_black_pkg = data.userRiskApps.userRiskAppPkg AppConfig.app_black_pkg = data.userRiskApps.userRiskAppPkg
AppConfig.flVideoFlag = data.vedioRules.isFlVideoFlag AppConfig.flVideoFlag = data.vedioRules.isFlVideoFlag
...@@ -350,37 +353,8 @@ class MyFragment : BaseFragment(), ...@@ -350,37 +353,8 @@ class MyFragment : BaseFragment(),
} }
} }
/**
* 设置Banner
*/
override fun getMyRotationChartSuc(data: RotationChartBean) { override fun getMyRotationChartSuc(data: RotationChartBean) {
mBannerData = data TODO("Not yet implemented")
if (mBannerData?.list == null || mBannerData?.list!!.size == 0) {
mAdBannerAdapter = null
fl_my_banner.visibility = View.VISIBLE
LogUtil.d("TAG", "getMyRotationChartSuc")
banner_view.visibility = View.GONE
banner_view.stopAutoScroll()
BannerManager.getTtBanner(TtCsjAdManager.TT_AD_BANNER_MY, fl_my_banner)
} else {
fl_my_banner.visibility = View.GONE
banner_view.visibility = View.VISIBLE
mAdBannerAdapter = AdBannerAdapter(activity)
mAdBannerAdapter?.let {
val list: MutableList<RotationChartBean.ListBean?> = mutableListOf()
list.addAll(mBannerData?.list!!)
list.add(data.position, null)
it.setOnPageClickListener(this)
it.setData(list)
it.setAdPosition(data.position)
banner_view.setAdapter(it)
}
banner_view.startAutoScroll()
}
} }
override fun onRefresh(refreshLayout: RefreshLayout) { override fun onRefresh(refreshLayout: RefreshLayout) {
...@@ -391,7 +365,6 @@ class MyFragment : BaseFragment(), ...@@ -391,7 +365,6 @@ class MyFragment : BaseFragment(),
} else { } else {
myPresenter.userLogin() myPresenter.userLogin()
} }
} }
/** /**
...@@ -476,7 +449,7 @@ class MyFragment : BaseFragment(), ...@@ -476,7 +449,7 @@ class MyFragment : BaseFragment(),
if (nowDate == day) { if (nowDate == day) {
if (finalSignStatus == 1) { if (finalSignStatus == 1) {
carrierType = Constant.CARRIER_SIGNIN_HOMEPAGE_CARD carrierType = Constant.CARRIER_SIGNIN_HOMEPAGE_CARD
awardVideo(curSignCoin * 2, Constant.CARRIER_SIGNIN_HOMEPAGE_CARD) awardVedio(curSignCoin * 2, Constant.CARRIER_SIGNIN_HOMEPAGE_CARD)
} }
} }
} }
...@@ -538,13 +511,59 @@ class MyFragment : BaseFragment(), ...@@ -538,13 +511,59 @@ class MyFragment : BaseFragment(),
* 处理列表数据 * 处理列表数据
*/ */
private fun handleRecyData() { private fun handleRecyData() {
userConfig?.let { // userConfig?.let {
item_bottom_qqGroupNum.text = userConfig?.qqMsg?.useqq?.name + ":" + userConfig?.qqMsg?.useqq?.qq // item_bottom_qqGroupNum.text = userConfig?.qqMsg?.useqq?.name + ":" + userConfig?.qqMsg?.useqq?.qq
// }
//
// dataList.clear()
// dataList.addAll(userConfig!!.autoList)
// mainMyAdapter?.notifyDataSetChanged()
}
private fun showPowerDialog() {
if (ps.getBoolean(Constant.LOAN_PERMISSION_FLAG, true)) {
powerDialog()
} }
}
dataList.clear() /**
dataList.addAll(userConfig!!.autoList) * 权限弹窗
mainMyAdapter?.notifyDataSetChanged() */
private fun powerDialog() {
powerDialog = PowerDialog(requireActivity(), object : DialogListener() {
override fun onClick(v: View) {
when (v.id) {
R.id.tv_dialogper_agreement -> {
val bundle = Bundle()
bundle.putString(WebActivity.WEB_TITLE, getString(R.string.register_name))
bundle.putString(WebActivity.WEB_URL, Constant.REGISTER_URL)
readyGo(WebActivity::class.java, bundle)
}
R.id.tv_dialogper_policy -> {
val bundle = Bundle()
bundle.putString(WebActivity.WEB_TITLE, getString(R.string.privacy_name))
bundle.putString(WebActivity.WEB_URL, Constant.PRIVACY_URL)
readyGo(WebActivity::class.java, bundle)
}
R.id.btn_dialogper_back -> {
if (activity != null && !activity!!.isFinishing &&
powerDialog != null && powerDialog!!.isShowing
) {
showToast("请您同意授权,否则将无法使用APP功能")
}
}
R.id.btn_dialogper_next -> {
if (activity != null && !activity!!.isFinishing &&
powerDialog != null && powerDialog!!.isShowing
) {
powerDialog!!.dismiss()
ps.put(Constant.LOAN_PERMISSION_FLAG, false)
}
}
}
}
})
powerDialog!!.show()
} }
// 每日任务 // 每日任务
...@@ -723,7 +742,7 @@ class MyFragment : BaseFragment(), ...@@ -723,7 +742,7 @@ class MyFragment : BaseFragment(),
return return
} }
awardVideo(taskBean.otherConfig.coin, Constant.CARRIER_VERSUS_VIDEO) awardVedio(taskBean.otherConfig.coin, Constant.CARRIER_VERSUS_VIDEO)
} }
} }
...@@ -769,20 +788,6 @@ class MyFragment : BaseFragment(), ...@@ -769,20 +788,6 @@ class MyFragment : BaseFragment(),
it.selectBook() it.selectBook()
} }
} }
// 试玩平台
MainMyAdapter.TO_YWHZ -> {
if (!userManager.userIsLogin()) {
readyGo(WxLoginActivity::class.java)
return
}
try {
activity?.let { open(it) }
} catch (e: Exception) {
e.printStackTrace()
showToast("请重新退出账号登录")
}
}
MainMyAdapter.TO_DHGAME -> { MainMyAdapter.TO_DHGAME -> {
if (!UserManager.getInstance().userIsLogin()) { if (!UserManager.getInstance().userIsLogin()) {
readyGo(WxLoginActivity::class.java) readyGo(WxLoginActivity::class.java)
...@@ -809,27 +814,24 @@ class MyFragment : BaseFragment(), ...@@ -809,27 +814,24 @@ class MyFragment : BaseFragment(),
} }
} }
} }
} }
MainMyAdapter.TO_FIRSTDOWNLOAD -> { MainMyAdapter.TO_DOWNLOADS -> {
if (taskBean.otherConfig != null) { if (taskBean.otherConfig != null) {
when (taskBean.otherConfig.status) { when (taskBean.otherConfig.status) {
0 -> { 0 -> {
// 牧场人生包名 pkgMCRSCarrier = Constant.CARRIER_FIRSTDOWNLOADS
pkgMCRSCarrier = Constant.CARRIER_MC_FIRSTDOWNLOAD pkgMCRSKey = taskBean.otherConfig.key
pkgMCRSKey = ""
pkgMCRSName = taskBean.otherConfig.pkg pkgMCRSName = taskBean.otherConfig.pkg
// 下载牧场人生
DownloadApkManager.downloadApk(requireActivity(), taskBean.otherConfig.downloadUrl, pkgMCRSName) DownloadApkManager.downloadApk(requireActivity(), taskBean.otherConfig.downloadUrl, pkgMCRSName)
// 开启广播监听安装事件 // 开启广播监听安装事件
registerBroad() registerBroad()
} }
1 -> { 1 -> {
// 牧场人生APP,直接弹奖励框
val bundle = Bundle() val bundle = Bundle()
bundle.putInt(Constant.MAIN_CUR_COIN, taskBean.otherConfig.coin) bundle.putInt(Constant.MAIN_CUR_COIN, taskBean.otherConfig.coin)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_MC_FIRSTDOWNLOAD) bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_FIRSTDOWNLOADS)
bundle.putString(Constant.MAIN_EXTRA_ID, taskBean.otherConfig.key)
readyGo(AwardActivity::class.java, bundle) readyGo(AwardActivity::class.java, bundle)
onDestroyBroadcastReceiver() onDestroyBroadcastReceiver()
...@@ -837,22 +839,26 @@ class MyFragment : BaseFragment(), ...@@ -837,22 +839,26 @@ class MyFragment : BaseFragment(),
} }
} }
} }
MainMyAdapter.TO_DOWNLOADS -> { MainMyAdapter.TO_FIRSTDOWNLOAD -> {
if (taskBean.otherConfig != null) { if (taskBean.otherConfig != null) {
when (taskBean.otherConfig.status) { when (taskBean.otherConfig.status) {
0 -> { 0 -> {
pkgMCRSCarrier = Constant.CARRIER_FIRSTDOWNLOADS // 牧场人生包名
pkgMCRSKey = taskBean.otherConfig.key pkgMCRSCarrier = Constant.CARRIER_MC_FIRSTDOWNLOAD
pkgMCRSKey = ""
pkgMCRSName = taskBean.otherConfig.pkg pkgMCRSName = taskBean.otherConfig.pkg
// 下载牧场人生
DownloadApkManager.downloadApk(requireActivity(), taskBean.otherConfig.downloadUrl, pkgMCRSName) DownloadApkManager.downloadApk(requireActivity(), taskBean.otherConfig.downloadUrl, pkgMCRSName)
// 开启广播监听安装事件 // 开启广播监听安装事件
registerBroad() registerBroad()
} }
1 -> { 1 -> {
// 牧场人生APP,直接弹奖励框
val bundle = Bundle() val bundle = Bundle()
bundle.putInt(Constant.MAIN_CUR_COIN, taskBean.otherConfig.coin) bundle.putInt(Constant.MAIN_CUR_COIN, taskBean.otherConfig.coin)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_FIRSTDOWNLOADS) bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_MC_FIRSTDOWNLOAD)
bundle.putString(Constant.MAIN_EXTRA_ID, taskBean.otherConfig.key)
readyGo(AwardActivity::class.java, bundle) readyGo(AwardActivity::class.java, bundle)
onDestroyBroadcastReceiver() onDestroyBroadcastReceiver()
...@@ -860,9 +866,6 @@ class MyFragment : BaseFragment(), ...@@ -860,9 +866,6 @@ class MyFragment : BaseFragment(),
} }
} }
} }
MainMyAdapter.TO_MOKU -> {
gotoMoku()
}
} }
} }
} }
...@@ -888,10 +891,6 @@ class MyFragment : BaseFragment(), ...@@ -888,10 +891,6 @@ class MyFragment : BaseFragment(),
bundle.putString(WebActivity.WEB_URL, Constant.STRATEGY_URL) bundle.putString(WebActivity.WEB_URL, Constant.STRATEGY_URL)
readyGo(WebActivity::class.java, bundle) readyGo(WebActivity::class.java, bundle)
} }
R.id.iv_right_icon2 -> {
// 跳转QQ客服
jumpQQGroup()
}
R.id.item_customer_service -> { R.id.item_customer_service -> {
// 跳转加入QQ群 // 跳转加入QQ群
jumpQQGroup() jumpQQGroup()
...@@ -933,6 +932,7 @@ class MyFragment : BaseFragment(), ...@@ -933,6 +932,7 @@ class MyFragment : BaseFragment(),
// 热门活动 // 热门活动
override fun onItemClick(parent: AdapterView<*>, view: View, position: Int, id: Long) { override fun onItemClick(parent: AdapterView<*>, view: View, position: Int, id: Long) {
if (hotList.isNotEmpty()) { if (hotList.isNotEmpty()) {
val hotBean: BannerBean.ListBean = hotList[position + (mCurrentIndex * HOT_PAGE_SIZE)] val hotBean: BannerBean.ListBean = hotList[position + (mCurrentIndex * HOT_PAGE_SIZE)]
if (!TextUtils.isEmpty(hotBean.toUrl)) { if (!TextUtils.isEmpty(hotBean.toUrl)) {
...@@ -949,9 +949,6 @@ class MyFragment : BaseFragment(), ...@@ -949,9 +949,6 @@ class MyFragment : BaseFragment(),
Constant.HOT_ACTIVITY_CARD -> { Constant.HOT_ACTIVITY_CARD -> {
readyGo(EraseActivity::class.java) readyGo(EraseActivity::class.java)
} }
Constant.HOT_ACTIVITY_LIEBAO -> {
readyGo(LiebaoGameActivity::class.java)
}
Constant.HOT_ACTIVITY_MORNINGCLOCK -> { Constant.HOT_ACTIVITY_MORNINGCLOCK -> {
TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_MORNINGCLOCK) TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_MORNINGCLOCK)
readyGo(MorningClockActivity::class.java) readyGo(MorningClockActivity::class.java)
...@@ -968,13 +965,12 @@ class MyFragment : BaseFragment(), ...@@ -968,13 +965,12 @@ class MyFragment : BaseFragment(),
.request(Manifest.permission.READ_PHONE_STATE) .request(Manifest.permission.READ_PHONE_STATE)
.subscribe { granted: Boolean -> .subscribe { granted: Boolean ->
if (granted) { if (granted) {
if (AppConfig.scene_flag) { // if (AppConfig.scene_flag) {
// 猜成语 // // 猜成语
SceneUtil.cCy(requireActivity()) // SceneUtil.cCy(requireActivity())
AppConfig.scene_idiom_flag = true // } else {
} else { // SceneManager.signIn(requireActivity())
SceneManager.signIn(requireActivity()) // }
}
} else { } else {
showMissingPermissionDialog("设备") showMissingPermissionDialog("设备")
} }
...@@ -985,12 +981,12 @@ class MyFragment : BaseFragment(), ...@@ -985,12 +981,12 @@ class MyFragment : BaseFragment(),
.request(Manifest.permission.READ_PHONE_STATE) .request(Manifest.permission.READ_PHONE_STATE)
.subscribe { granted: Boolean -> .subscribe { granted: Boolean ->
if (granted) { if (granted) {
if (AppConfig.scene_flag) { // if (AppConfig.scene_flag) {
// 答题 // // 答题
SceneUtil.daTi(requireActivity()) // SceneUtil.daTi(requireActivity())
} else { // } else {
SceneManager.signIn(requireActivity()) // SceneManager.signIn(requireActivity())
} // }
} else { } else {
showMissingPermissionDialog("设备") showMissingPermissionDialog("设备")
} }
...@@ -1001,12 +997,12 @@ class MyFragment : BaseFragment(), ...@@ -1001,12 +997,12 @@ class MyFragment : BaseFragment(),
.request(Manifest.permission.READ_PHONE_STATE) .request(Manifest.permission.READ_PHONE_STATE)
.subscribe { granted: Boolean -> .subscribe { granted: Boolean ->
if (granted) { if (granted) {
if (AppConfig.scene_flag) { // if (AppConfig.scene_flag) {
// 刮刮乐 // // 刮刮乐
SceneUtil.scrapPage(requireActivity()) // SceneUtil.scrapPage(requireActivity())
} else { // } else {
SceneManager.signIn(requireActivity()) // SceneManager.signIn(requireActivity())
} // }
} else { } else {
showMissingPermissionDialog("设备") showMissingPermissionDialog("设备")
} }
...@@ -1066,9 +1062,6 @@ class MyFragment : BaseFragment(), ...@@ -1066,9 +1062,6 @@ class MyFragment : BaseFragment(),
bundle.putInt(Constant.WRAPPER_TYPE, Constant.WRAPPER_TYPE_KYL) bundle.putInt(Constant.WRAPPER_TYPE, Constant.WRAPPER_TYPE_KYL)
readyGo(WrapperActivity::class.java, bundle) readyGo(WrapperActivity::class.java, bundle)
} }
Constant.HOT_ACTIVITY_MOKU -> {
gotoMoku()
}
else -> { else -> {
if (!TextUtils.isEmpty(hotBean.url) && !TextUtils.isEmpty(hotBean.title)) { if (!TextUtils.isEmpty(hotBean.url) && !TextUtils.isEmpty(hotBean.title)) {
val bundle = Bundle() val bundle = Bundle()
...@@ -1085,20 +1078,20 @@ class MyFragment : BaseFragment(), ...@@ -1085,20 +1078,20 @@ class MyFragment : BaseFragment(),
/** /**
* 获取激励视频 * 获取激励视频
*/ */
private fun awardVideo(coin: Int, carrierType: String) { private fun awardVedio(coin: Int, carrierType: String) {
if (videoAdingManager.videoFinishFlag) { if (vedioAdingManager.videoFinishFlag) {
showToast("今日视频已看完,请明天再来吧") showToast("今日视频已看完,请明天再来吧")
return return
} }
loadVideoFailCount = 0 loadVedioFailCount = 0
showLoading("加载中...") showLoading("加载中...")
val bean = VideoAdingBean() val bean = VideoAdingBean()
bean.carrierType = carrierType bean.carrierType = carrierType
bean.curCoin = coin bean.curCoin = coin
loadVideo(videoAdingManager, bean, true) loadVideo(vedioAdingManager, bean, true)
} }
/** /**
...@@ -1112,8 +1105,8 @@ class MyFragment : BaseFragment(), ...@@ -1112,8 +1105,8 @@ class MyFragment : BaseFragment(),
} }
override fun videoAdingListenerFail(adType: String) { override fun videoAdingListenerFail(adType: String) {
loadVideoFailCount++ loadVedioFailCount++
if (loadVideoFailCount >= 2) { if (loadVedioFailCount >= 2) {
hideLoading() hideLoading()
showToast("加载失败,请稍后重试!") showToast("加载失败,请稍后重试!")
} else { } else {
...@@ -1128,10 +1121,10 @@ class MyFragment : BaseFragment(), ...@@ -1128,10 +1121,10 @@ class MyFragment : BaseFragment(),
}) })
if (isFirstLoad) { if (isFirstLoad) {
// 首页按权重加载 // 首页按权重加载
videoAdingManager.loadAding(activity, bean) vedioAdingManager.loadAding(activity, bean)
} else { } else {
// 失败按优先级加载 // 失败按优先级加载
videoAdingManager.loadFailAding(activity, bean) vedioAdingManager.loadFailAding(activity, bean)
} }
} }
...@@ -1172,7 +1165,7 @@ class MyFragment : BaseFragment(), ...@@ -1172,7 +1165,7 @@ class MyFragment : BaseFragment(),
private fun initManager() { private fun initManager() {
BannerManager.init() BannerManager.init()
videoAdingManager = VideoAdingManager.getInstance(activity) vedioAdingManager = VideoAdingManager.getInstance(activity)
if (!TextUtils.isEmpty(userManager.userID)) { if (!TextUtils.isEmpty(userManager.userID)) {
// 登录成功的用户初始化鱼丸盒子 // 登录成功的用户初始化鱼丸盒子
...@@ -1182,102 +1175,86 @@ class MyFragment : BaseFragment(), ...@@ -1182,102 +1175,86 @@ class MyFragment : BaseFragment(),
} }
// 聚乐云初始化 // 聚乐云初始化
SceneManager.initScene() // SceneManager.initScene()
SceneManager.signIn(requireActivity()) // SceneManager.signIn(requireActivity())
if (!TextUtils.isEmpty(MintsApplication.OAID)) {
MokuManager.initOaid(MintsApplication.OAID)
}
} }
private fun initView() { private fun initView() {
tv_title.text = "个人中心" tv_title.text = "个人中心"
view_title.text = "每日任务" // view_title.text = "每日任务"
iv_right_icon.visibility = View.VISIBLE iv_right_icon.visibility = View.VISIBLE
iv_right_icon.setImageResource(R.mipmap.ic_settings) iv_right_icon.setImageResource(R.mipmap.ic_settings)
iv_right_icon2.visibility = View.VISIBLE // tv_left_subtitle.visibility = View.VISIBLE
iv_right_icon2.setImageResource(R.mipmap.icon_customer_service) // tv_left_subtitle.text = "平台攻略"
tv_left_subtitle.visibility = View.VISIBLE
tv_left_subtitle.text = "平台攻略"
tv_left_subtitle.setOnClickListener(this) tv_left_subtitle.setOnClickListener(this)
iv_right_icon2.setOnClickListener(this)
item_title_id.setOnClickListener(this) item_title_id.setOnClickListener(this)
iv_right_icon.setOnClickListener(this) iv_right_icon.setOnClickListener(this)
btn_withdraw.setOnClickListener(this) btn_withdraw.setOnClickListener(this)
btn_coinRecord.setOnClickListener(this) btn_coinRecord.setOnClickListener(this)
item_title_friends.setOnClickListener(this) item_title_friends.setOnClickListener(this)
ll_my_login.setOnClickListener(this) ll_my_login.setOnClickListener(this)
item_customer_service.setOnClickListener(this) // item_customer_service.setOnClickListener(this)
// item_promotions_egv.onItemClickListener = this
vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener { // vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrollStateChanged(state: Int) { // override fun onPageScrollStateChanged(state: Int) {
} // }
//
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { // override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
} // }
//
override fun onPageSelected(position: Int) { // override fun onPageSelected(position: Int) {
mCurrentIndex = position // mCurrentIndex = position
//
piv_grid.selection = position // piv_grid.selection = position
} // }
//
}) // })
} }
/** /**
* 初始化Recyclerview * 初始化Recyclerview
*/ */
private fun initRecy() { private fun initRecy() {
recy_my.addItemDecoration(DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL)) // recy_my.addItemDecoration(DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL))
recy_my.setItemViewCacheSize(10) // recy_my.setItemViewCacheSize(10)
mainMyAdapter = MainMyAdapter(mContext, dataList) // mainMyAdapter = MainMyAdapter(mContext, dataList)
recy_my.adapter = mainMyAdapter // recy_my.adapter = mainMyAdapter
mainMyAdapter?.setOnItemChildClickListener(this) // mainMyAdapter?.setOnItemChildClickListener(this)
} }
/** /**
* 设置视频权重 * 设置视频权重
*/ */
private fun initAdWeight(data: UserTaskMsgBean) { private fun initAdWeight(data: UserTaskMsgBean) {
videoAdingManager.initAdWeight(data.vedioRules.csJ_VEDIO.rate, // vedioAdingManager.initAdWeight(data.vedioRules.csJ_VEDIO.rate,
data.vedioRules.ylH_VEDIO.rate, // data.vedioRules.ylH_VEDIO.rate,
data.vedioRules.sdhZ_VEDIO.rate, // data.vedioRules.sdhZ_VEDIO.rate,
data.vedioRules.fL_VEDIO.rate, // data.vedioRules.fL_VEDIO.rate,
data.vedioRules.corAl_VIDEO.rate, // data.vedioRules.corAl_VIDEO.rate,
data.vedioRules.csjfulL_VEDIO.rate, // data.vedioRules.csjfulL_VEDIO.rate,
data.vedioRules.kS_VEDIO.rate, // data.vedioRules.kS_VEDIO.rate)
data.vedioRules.rtA_VEDIO.rate // LogUtil.d(TAG, "首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} " +
) // "ylhWeight:${data.vedioRules.ylH_VEDIO.rate} " +
LogUtil.d(TAG, "首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} " + // "sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} " +
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} " + // "csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} " +
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} " + // "shWeight:${data.vedioRules.corAl_VIDEO.rate} " +
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} " + // "ksWeight:${data.vedioRules.kS_VEDIO.rate} " +
"shWeight:${data.vedioRules.corAl_VIDEO.rate} " + // "flWeight:${data.vedioRules.fL_VEDIO.rate}")
"flWeight:${data.vedioRules.fL_VEDIO.rate} " + // // 广告视频数
"rtaWeight:${data.vedioRules.rtA_VEDIO.rate} " + // AppConfig.csjVideoAdCount = data.vedioRules.csJ_VEDIO.surplus
"ksWeight:${data.vedioRules.kS_VEDIO.rate}" // AppConfig.ylhAdCount = data.vedioRules.ylH_VEDIO.surplus
) // AppConfig.wnVideoAdCount = data.vedioRules.sdhZ_VEDIO.surplus
// 广告视频数 // AppConfig.flVideoAdCount = data.vedioRules.fL_VEDIO.surplus
AppConfig.csjVideoAdCount = data.vedioRules.csJ_VEDIO.surplus // AppConfig.shVideoAdCount = data.vedioRules.corAl_VIDEO.surplus
AppConfig.ylhAdCount = data.vedioRules.ylH_VEDIO.surplus // AppConfig.csjFullVideoAdCount = data.vedioRules.csjfulL_VEDIO.surplus
AppConfig.wnVideoAdCount = data.vedioRules.sdhZ_VEDIO.surplus // LogUtil.d(TAG, "首页视频数:csjCount:${AppConfig.csjVideoAdCount} " +
AppConfig.flVideoAdCount = data.vedioRules.fL_VEDIO.surplus // "ylhCount:${AppConfig.ylhAdCount} " +
AppConfig.shVideoAdCount = data.vedioRules.corAl_VIDEO.surplus // "sdhzCount:${AppConfig.wnVideoAdCount} " +
AppConfig.ksVideoAdCount = data.vedioRules.kS_VEDIO.surplus // "csjFullCount:${AppConfig.csjFullVideoAdCount} " +
AppConfig.rtaVideoAdCount = data.vedioRules.rtA_VEDIO.surplus // "shCount:${AppConfig.shVideoAdCount} " +
LogUtil.d(TAG, "首页视频数:csjCount:${AppConfig.csjVideoAdCount} " + // "ksCount:${AppConfig.ksVideoAdCount} " +
"ylhCount:${AppConfig.ylhAdCount} " + // "flCount:${AppConfig.flVideoAdCount}")
"sdhzCount:${AppConfig.wnVideoAdCount} " +
"csjFullCount:${AppConfig.csjFullVideoAdCount} " +
"shCount:${AppConfig.shVideoAdCount} " +
"flCount:${AppConfig.flVideoAdCount} " +
"rtaCount:${AppConfig.rtaVideoAdCount} " +
"ksCount:${AppConfig.ksVideoAdCount}"
)
} }
private fun initExpress(flowAdRules: FlowAdRulesBean) { private fun initExpress(flowAdRules: FlowAdRulesBean) {
...@@ -1288,11 +1265,15 @@ class MyFragment : BaseFragment(), ...@@ -1288,11 +1265,15 @@ class MyFragment : BaseFragment(),
* 跳转QQ群弹框 * 跳转QQ群弹框
*/ */
private fun jumpQQGroup() { private fun jumpQQGroup() {
DialogUtils.showDialog(mContext, "提示", "好赚钱想要打开QQ", "取消", "打开", object : DialogListener() { cdaa = CustomDialogAsApple(context, object : DialogListener() {
override fun onClick(dialog: Dialog?, v: View?) { override fun onClick(v: View) {
dialog?.dismiss() if (cdaa != null && cdaa!!.isShowing) {
cdaa!!.dismiss()
}
when (v.id) {
R.id.dialog_btn_left -> {
when (v?.id) { }
R.id.dialog_btn_right -> { R.id.dialog_btn_right -> {
userConfig?.let { userConfig?.let {
QQJumpUtil.jumpQQGroup(it.qqMsg.useqq.url, requireActivity()) QQJumpUtil.jumpQQGroup(it.qqMsg.useqq.url, requireActivity())
...@@ -1301,24 +1282,40 @@ class MyFragment : BaseFragment(), ...@@ -1301,24 +1282,40 @@ class MyFragment : BaseFragment(),
} }
} }
}) })
cdaa!!.setTitle("提示")
cdaa!!.setContent("尤友想要打开QQ")
cdaa!!.setLeft("取消")
cdaa!!.setRight("打开")
cdaa!!.show()
} }
/** /**
* 第一次微信分享弹框 * 第一次微信分享弹框
*/ */
private fun firstWeChatInvite() { private fun firstWeChatInvite() {
DialogUtils.showDialog(mContext, "提示", "被邀请人成功提现0.5元后发放贡献", "取消", "打开微信", object : DialogListener() { cdaa = CustomDialogAsApple(context, object : DialogListener() {
override fun onClick(dialog: Dialog?, v: View?) { override fun onClick(v: View) {
dialog?.dismiss() if (cdaa != null && cdaa!!.isShowing) {
cdaa!!.dismiss()
}
when (v.id) {
R.id.dialog_btn_left -> {
when (v?.id) { }
R.id.dialog_btn_right -> { R.id.dialog_btn_right -> {
ps.put(Constant.FIRST_SHARE_MY, true) ps.put(Constant.FIRST_SHARE_MY, true)
cdaa!!.dismiss()
shareImgDialog() shareImgDialog()
} }
} }
} }
}) })
cdaa!!.setTitle("提示")
cdaa!!.setContent("被邀请人成功提现0.5元后发放贡献")
cdaa!!.setLeft("取消")
cdaa!!.setRight("打开微信")
cdaa!!.show()
} }
/** /**
...@@ -1353,6 +1350,24 @@ class MyFragment : BaseFragment(), ...@@ -1353,6 +1350,24 @@ class MyFragment : BaseFragment(),
* 分享文章 * 分享文章
*/ */
private fun shareArticle(coin: Int) { private fun shareArticle(coin: Int) {
// if (XzArticleCoreImpl.get().initIsSuccess()) {
// XzArticleCoreImpl.get().openArticleListActivity(requireActivity())
// } else {
// try {
// XzArticleCoreImpl.get().initUser(userManager.userID, coin.toString(), "金币",
// object : IXzArticleSdkInitCallback {
// override fun initSuccess() {
// shareArticle(coin)
// }
//
// override fun initFailed(errMsg: String) {
// showToast("初始化失败,请稍候重试~")
// }
// })
// } catch (e: XzSdkException) {
// e.printStackTrace()
// }
// }
val bundle = Bundle() val bundle = Bundle()
bundle.putInt(Constant.WRAPPER_TYPE, Constant.WRAPPER_TYPE_WZ) bundle.putInt(Constant.WRAPPER_TYPE, Constant.WRAPPER_TYPE_WZ)
readyGo(WrapperActivity::class.java, bundle) readyGo(WrapperActivity::class.java, bundle)
...@@ -1362,24 +1377,21 @@ class MyFragment : BaseFragment(), ...@@ -1362,24 +1377,21 @@ class MyFragment : BaseFragment(),
* 高额任务提示弹框 * 高额任务提示弹框
*/ */
private fun highVideoTint(taskBean: MyInfo.AutoListBean) { private fun highVideoTint(taskBean: MyInfo.AutoListBean) {
val ssb = SpanUtils() cdaa = CustomDialogAsApple(context, object : DialogListener() {
.append("1.点击开始任务,观看广告时,点击广告中的下载APP区域\r\n" + override fun onClick(v: View) {
"2.等待APP下载完成后,安装该APP\r\n" + if (cdaa != null && cdaa!!.isShowing) {
"3.通过好赚钱APP打开该APP并试玩至少30秒" + cdaa!!.dismiss()
"\n\n") }
.append("说明:有些可能不是下载APP类型的广告,请关闭广告后重试").setFontSize(BubbleUtils.dp2px(12)) when (v.id) {
.create() R.id.dialog_btn_left -> {
cdaa!!.dismiss()
DialogUtils.showDialog(mContext, "任务步骤", ssb, "取消", "开始任务", object : DialogListener() { }
override fun onClick(dialog: Dialog?, v: View?) {
dialog?.dismiss()
when (v?.id) {
R.id.dialog_btn_right -> { R.id.dialog_btn_right -> {
cdaa!!.dismiss()
carrierType = Constant.CARRIER_HIGH_ACTIVITY carrierType = Constant.CARRIER_HIGH_ACTIVITY
videoAdingManager.setIsHighWeight(true) vedioAdingManager.setIsHighWeight(true)
awardVideo(taskBean.otherConfig.coin, Constant.CARRIER_HIGH_ACTIVITY) awardVedio(taskBean.otherConfig.coin, Constant.CARRIER_HIGH_ACTIVITY)
// 注册高额任务广播监听 // 注册高额任务广播监听
registerBroad() registerBroad()
...@@ -1387,23 +1399,50 @@ class MyFragment : BaseFragment(), ...@@ -1387,23 +1399,50 @@ class MyFragment : BaseFragment(),
} }
} }
}) })
val ssb = SpanUtils()
.append("1.点击开始任务,观看广告时,点击广告中的下载APP区域\r\n" +
"2.等待APP下载完成后,安装该APP\r\n" +
"3.通过尤友APP打开该APP并试玩至少30秒" +
"\n\n")
.append("说明:有些可能不是下载APP类型的广告,请关闭广告后重试").setFontSize(BubbleUtils.dp2px(12))
.create()
cdaa?.let {
it.setTitle("任务步骤")
it.setContent(ssb)
it.setContentGravity(Gravity.START)
it.setLeft("取消")
it.setRight("开始任务")
it.show()
}
} }
/** /**
* 打开应用使用记录授权弹框 * 打开应用使用记录授权弹框
*/ */
private fun openAppUsageStats() { private fun openAppUsageStats() {
DialogUtils.showDialog(mContext, "任务步骤", "该任务需要【应用使用记录】权限", "取消", "打开授权", object : DialogListener() { cdaa = CustomDialogAsApple(context, object : DialogListener() {
override fun onClick(dialog: Dialog?, v: View?) { override fun onClick(v: View) {
dialog?.dismiss() if (cdaa != null && cdaa!!.isShowing) {
cdaa!!.dismiss()
when (v?.id) { }
when (v.id) {
R.id.dialog_btn_left -> {
cdaa!!.dismiss()
}
R.id.dialog_btn_right -> { R.id.dialog_btn_right -> {
cdaa!!.dismiss()
AppUtil.openUsageStats(mContext) AppUtil.openUsageStats(mContext)
} }
} }
} }
}) })
cdaa?.let {
it.setTitle("提示")
it.setContent("该任务需要【应用使用记录】权限")
it.setLeft("取消")
it.setRight("打开授权")
it.show()
}
} }
/** /**
...@@ -1435,7 +1474,6 @@ class MyFragment : BaseFragment(), ...@@ -1435,7 +1474,6 @@ class MyFragment : BaseFragment(),
} catch (e: Exception) { } catch (e: Exception) {
e.printStackTrace() e.printStackTrace()
} }
} }
} }
...@@ -1449,28 +1487,13 @@ class MyFragment : BaseFragment(), ...@@ -1449,28 +1487,13 @@ class MyFragment : BaseFragment(),
*/ */
fun turnDayTask() { fun turnDayTask() {
if (signCardBean != null) { if (signCardBean != null) {
scrollviewMy.scrollTo(0, llMyRoot.height - scrollviewMy.scrollTo(0, llMyRoot.height - viewTitleDayTask.height)
recy_my.height -
item_customer_service.height -
item_bottom_qqGroupNum.height -
item_bottom_info.height -
viewTitleDayTask.height -
Utils.dip2px(context, 40f)
)
return return
} }
Timer().schedule(800) { Timer().schedule(800) {
activity?.runOnUiThread { activity?.runOnUiThread {
// scrollviewMy.scrollTo(0, llMyRoot.height - viewTitleDayTask.height) scrollviewMy.scrollTo(0, llMyRoot.height - viewTitleDayTask.height)
scrollviewMy.scrollTo(0, llMyRoot.height -
recy_my.height -
item_customer_service.height -
item_bottom_qqGroupNum.height -
item_bottom_info.height -
viewTitleDayTask.height -
Utils.dip2px(context, 40f)
)
} }
} }
} }
...@@ -1485,42 +1508,4 @@ class MyFragment : BaseFragment(), ...@@ -1485,42 +1508,4 @@ class MyFragment : BaseFragment(),
mReceiverBroadcastReceiver = null mReceiverBroadcastReceiver = null
} }
} }
private fun gotoMoku() {
RxPermissions(requireActivity())
.request(Manifest.permission.READ_PHONE_STATE,
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE)
.subscribe { granted: Boolean ->
if (granted) {
MokuManager.gotoMoku(requireContext())
if (ps.getBoolean(Constant.MOKU_FLAG_GUIDE, true)) {
readyGo(MokuGuideActivity::class.java)
ps.put(Constant.MOKU_FLAG_GUIDE, false)
}
} else {
showMissingPermissionDialog("设备,存储")
}
}
}
/**
* Banner点击事件
*/
override fun onPageClick(position: Int) {
mBannerData?.let {
val pkg = it.list[position].pkg
if (!TextUtils.isEmpty(pkg) && AppUtil.checkPackInfo(activity!!, pkg)) {
AppTryPlayManager.toTryPlay(pkg)
} else {
//未安装
val bundle = Bundle()
bundle.putString(WebActivity.WEB_TITLE, it.list[position].title)
bundle.putString(WebActivity.WEB_URL, it.list[position].url)
readyGo(WebActivity::class.java, bundle)
}
}
}
} }
\ No newline at end of file
...@@ -101,37 +101,37 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall ...@@ -101,37 +101,37 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
return; return;
} }
if (count == 0) { // if (count == 0) {
// LogUtil.d("ForegroundOrBackground", System.currentTimeMillis() - leaveTime + " onActivityStarted"); //// LogUtil.d("ForegroundOrBackground", System.currentTimeMillis() - leaveTime + " onActivityStarted");
// 60秒后打开应用 显示开屏广告 // // 60秒后打开应用 显示开屏广告
if (System.currentTimeMillis() - leaveTime >= 60000) { // if (System.currentTimeMillis() - leaveTime >= 60000) {
//
if (isYlhSplash) { // if (isYlhSplash) {
isYlhSplash = false; // isYlhSplash = false;
//
if (ylhIntent == null) { // if (ylhIntent == null) {
// 优量汇广告 // // 优量汇广告
ylhIntent = new Intent(activity, SplashADActivity.class); // ylhIntent = new Intent(activity, SplashADActivity.class);
} // }
activity.startActivity(ylhIntent); // activity.startActivity(ylhIntent);
} else { // } else {
isYlhSplash = true; // isYlhSplash = true;
//
if (csjIntent == null) { // if (csjIntent == null) {
// 快手广告
csjIntent = new Intent(activity, SplashCsjADActivity.class);
}
activity.startActivity(csjIntent);
// if (ksIntent == null) {
// // 快手广告 // // 快手广告
// ksIntent = new Intent(activity, SplashKsADActivity.class); // csjIntent = new Intent(activity, SplashCsjADActivity.class);
// } // }
// activity.startActivity(ksIntent); // activity.startActivity(csjIntent);
} //
//// if (ksIntent == null) {
} //// // 快手广告
} //// ksIntent = new Intent(activity, SplashKsADActivity.class);
//// }
//// activity.startActivity(ksIntent);
// }
//
// }
// }
count++; count++;
} }
......
...@@ -26,78 +26,78 @@ ...@@ -26,78 +26,78 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<LinearLayout <!-- <LinearLayout-->
android:id="@+id/tab_rl_one" <!-- android:id="@+id/tab_rl_one"-->
android:layout_width="0dp" <!-- android:layout_width="0dp"-->
android:layout_height="match_parent" <!-- android:layout_height="match_parent"-->
android:layout_weight="1.0" <!-- android:layout_weight="1.0"-->
android:gravity="center" <!-- android:gravity="center"-->
android:orientation="vertical"> <!-- android:orientation="vertical">-->
<ImageView <!-- <ImageView-->
android:id="@+id/tab_iv_one" <!-- android:id="@+id/tab_iv_one"-->
android:layout_width="25dp" <!-- android:layout_width="25dp"-->
android:layout_height="25dp" <!-- android:layout_height="25dp"-->
android:src="@drawable/tab_loan_btn" /> <!-- android:src="@drawable/tab_loan_btn" />-->
<TextView <!-- <TextView-->
android:id="@+id/tab_tv_one" <!-- android:id="@+id/tab_tv_one"-->
android:layout_width="wrap_content" <!-- android:layout_width="wrap_content"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:text="@string/bottom_tab_main" <!-- android:text="@string/bottom_tab_main"-->
android:textColor="@drawable/item_txt_sel" <!-- android:textColor="@drawable/item_txt_sel"-->
android:textSize="11sp" /> <!-- android:textSize="11sp" />-->
</LinearLayout> <!-- </LinearLayout>-->
<LinearLayout <!-- <LinearLayout-->
android:id="@+id/tab_rl_two" <!-- android:id="@+id/tab_rl_two"-->
android:layout_width="0dp" <!-- android:layout_width="0dp"-->
android:layout_height="match_parent" <!-- android:layout_height="match_parent"-->
android:layout_weight="1.0" <!-- android:layout_weight="1.0"-->
android:gravity="center" <!-- android:gravity="center"-->
android:orientation="vertical"> <!-- android:orientation="vertical">-->
<ImageView <!-- <ImageView-->
android:id="@+id/tab_iv_two" <!-- android:id="@+id/tab_iv_two"-->
android:layout_width="25dp" <!-- android:layout_width="25dp"-->
android:layout_height="25dp" <!-- android:layout_height="25dp"-->
android:src="@drawable/tab_video_btn" /> <!-- android:src="@drawable/tab_video_btn" />-->
<TextView <!-- <TextView-->
android:id="@+id/tab_tv_two" <!-- android:id="@+id/tab_tv_two"-->
android:layout_width="wrap_content" <!-- android:layout_width="wrap_content"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:text="@string/bottom_tab_channel" <!-- android:text="@string/bottom_tab_channel"-->
android:textColor="@drawable/item_txt_sel" <!-- android:textColor="@drawable/item_txt_sel"-->
android:textSize="11sp" /> <!-- android:textSize="11sp" />-->
</LinearLayout> <!-- </LinearLayout>-->
<LinearLayout <!-- <LinearLayout-->
android:id="@+id/tab_rl_three" <!-- android:id="@+id/tab_rl_three"-->
android:layout_width="0dp" <!-- android:layout_width="0dp"-->
android:layout_height="75dp" <!-- android:layout_height="75dp"-->
android:layout_gravity="bottom" <!-- android:layout_gravity="bottom"-->
android:layout_weight="1.0"> <!-- android:layout_weight="1.0">-->
<ImageView <!-- <ImageView-->
android:layout_width="match_parent" <!-- android:layout_width="match_parent"-->
android:layout_height="70dp" <!-- android:layout_height="70dp"-->
android:src="@mipmap/tab_pan_btn_big" /> <!-- android:src="@mipmap/tab_pan_btn_big" />-->
<!-- <ImageView--> <!-- <ImageView-->
<!-- android:id="@+id/tab_iv_pan"--> <!-- android:id="@+id/tab_iv_pan"-->
<!-- android:layout_width="25dp"--> <!-- android:layout_width="25dp"-->
<!-- android:layout_height="25dp"--> <!-- android:layout_height="25dp"-->
<!-- android:src="@drawable/tab_pan_btn" />--> <!-- android:src="@drawable/tab_pan_btn" />-->
<!-- <TextView--> <!-- <TextView-->
<!-- android:id="@+id/tab_tv_pan"--> <!-- android:id="@+id/tab_tv_pan"-->
<!-- android:layout_width="wrap_content"--> <!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"--> <!-- android:layout_height="wrap_content"-->
<!-- android:text="@string/bottom_tab_pan"--> <!-- android:text="@string/bottom_tab_pan"-->
<!-- android:textColor="@drawable/item_txt_sel"--> <!-- android:textColor="@drawable/item_txt_sel"-->
<!-- android:textSize="11sp" />--> <!-- android:textSize="11sp" />-->
</LinearLayout> <!-- </LinearLayout>-->
<LinearLayout <LinearLayout
android:id="@+id/tab_rl_four" android:id="@+id/tab_rl_four"
......
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:fadingEdge="none"
android:overScrollMode="never">
<LinearLayout
android:id="@+id/ll_food"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="360dp"
android:background="@mipmap/bg_eat">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="60dp"
android:src="@mipmap/ic_font_food"
android:visibility="gone" />
<com.mints.goodmoney.ui.widgets.MealView
android:id="@+id/svWalk"
android:layout_width="375dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="80dp" />
</FrameLayout>
<!-- <FrameLayout-->
<!-- android:id="@+id/flSubsidykAd"-->
<!-- android:layout_width="340dp"-->
<!-- android:layout_height="340dp"-->
<!-- android:layout_gravity="center_horizontal"-->
<!-- android:layout_marginTop="20dp"-->
<!-- android:background="@color/color_0000" />-->
</LinearLayout>
</ScrollView>
...@@ -27,55 +27,48 @@ ...@@ -27,55 +27,48 @@
android:overScrollMode="never"> android:overScrollMode="never">
<LinearLayout <LinearLayout
android:id="@+id/llMyRoot"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/item_fragment_main_my_title" /> <LinearLayout
android:id="@+id/llMyRoot"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/item_fragment_main_my_clock" /> <include layout="@layout/item_fragment_main_my_title" />
<include layout="@layout/item_divider_gray" /> <include layout="@layout/item_fragment_main_my_clock" />
<include layout="@layout/item_fragment_main_my_promotions" /> <!-- <FrameLayout-->
<!-- android:id="@+id/fl_my_banner"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="12dp"-->
<!-- android:layout_marginEnd="12dp"-->
<!-- android:background="@drawable/shape_bg_award"-->
<!-- android:visibility="gone" />-->
<include layout="@layout/item_divider_gray" /> <!-- <include layout="@layout/item_divider_gray" />-->
<FrameLayout <!-- <include layout="@layout/item_fragment_main_my_promotions" />-->
android:id="@+id/fl_my_banner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:background="@drawable/shape_bg_award"
android:visibility="gone" />
<com.mints.goodmoney.ui.widgets.BannerView <!-- <include layout="@layout/item_divider_gray" />-->
android:id="@+id/banner_view"
android:layout_width="match_parent" <!-- <include layout="@layout/view_title" />-->
android:layout_height="150dp" </LinearLayout>
android:visibility="gone"
app:bannerAnimDuration="1500" <!-- <androidx.recyclerview.widget.RecyclerView-->
app:bannerAnimScroll="true" <!-- android:id="@+id/recy_my"-->
app:bannerAutoScroll="true" <!-- android:layout_width="match_parent"-->
app:bannerPageAlpha="0" <!-- android:layout_height="wrap_content"-->
app:bannerPageMargin="0dp" <!-- android:layout_marginStart="15dp"-->
app:bannerPagePercent="1" <!-- android:layout_marginEnd="15dp"-->
app:bannerScrollDuration="5000"/> <!-- android:nestedScrollingEnabled="false"-->
<!-- app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />-->
<include layout="@layout/view_title" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recy_my"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:nestedScrollingEnabled="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<include layout="@layout/item_fragment_main_my_customer_service" /> <!-- <include layout="@layout/item_fragment_main_my_customer_service" />-->
</LinearLayout> </LinearLayout>
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<RelativeLayout <RelativeLayout
android:visibility="gone"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="50dp" android:layout_height="50dp"
android:background="@drawable/btn_my_friends" android:background="@drawable/btn_my_friends"
...@@ -52,6 +53,7 @@ ...@@ -52,6 +53,7 @@
android:drawableTop="@mipmap/ic_friends" android:drawableTop="@mipmap/ic_friends"
android:text="平台分红" android:text="平台分红"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" /> android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
......
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