Commit f1804f87 authored by jyx's avatar jyx

好赚钱审核包

parent 31bda680
...@@ -54,46 +54,48 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -54,46 +54,48 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
ZhangyueManager.onCreateIreader(baseApplication) ZhangyueManager.onCreateIreader(baseApplication)
showShortVedioLayout() AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_FIVE
if (moneyFragment == null) { // showShortVedioLayout()
moneyFragment = MoneyFragment()
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 // mainFriendsStatus=AppConfig.mainFriendsStatus
// 0-平台分红 1-微转 2-猜成语,防止线程不一样 // 0-平台分红 1-微转 2-猜成语,防止线程不一样
when (mainFriendsStatus) { // when (mainFriendsStatus) {
0 -> { // 0 -> {
tab_iv_four.setImageResource(R.drawable.tab_friends_btn) tab_iv_four.setImageResource(R.drawable.tab_friends_btn)
tab_tv_four.text = "平台分红" tab_tv_four.text = "平台分红"
mainFriendsStatus = 0 mainFriendsStatus = 0
} // }
1 -> { // 1 -> {
tab_iv_four.setImageResource(R.drawable.tab_friends_btn) // tab_iv_four.setImageResource(R.drawable.tab_friends_btn)
tab_tv_four.text = "分享" // tab_tv_four.text = "分享"
mainFriendsStatus = 1 // mainFriendsStatus = 1
} // }
2 -> { // 2 -> {
tab_iv_four.setImageResource(R.drawable.tab_wz_share_btn) // tab_iv_four.setImageResource(R.drawable.tab_wz_share_btn)
tab_tv_four.text = "猜成语" // tab_tv_four.text = "猜成语"
mainFriendsStatus = 2 // mainFriendsStatus = 2
} // }
} // }
tab_iv_one.isSelected = true tab_rl_five.isSelected = true
tab_tv_one.isSelected = true tab_rl_five.isSelected = true
tab_rl_one.setOnClickListener(this) // tab_rl_one.setOnClickListener(this)
tab_rl_three.setOnClickListener(this) tab_rl_three.setOnClickListener(this)
tab_rl_two.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)
} }
......
...@@ -88,10 +88,10 @@ class FriendsFragment(private var isResume: Boolean = false) : BaseFragment(), F ...@@ -88,10 +88,10 @@ class FriendsFragment(private var isResume: Boolean = false) : BaseFragment(), F
@SuppressLint("ClickableViewAccessibility") @SuppressLint("ClickableViewAccessibility")
private fun initView() { private fun initView() {
tv_right_subtitle.visibility = View.VISIBLE // tv_right_subtitle.visibility = View.VISIBLE
tv_right_subtitle.text = "玩法规则" // tv_right_subtitle.text = "玩法规则"
tv_right_subtitle.setTextColor(ContextCompat.getColor(mContext, R.color.color_666)) // tv_right_subtitle.setTextColor(ContextCompat.getColor(mContext, R.color.color_666))
tv_right_subtitle.setOnClickListener { } // tv_right_subtitle.setOnClickListener { }
tv_title.text = "瓜分百万现金福利" tv_title.text = "瓜分百万现金福利"
btn_get_bonus.setOnClickListener(this) btn_get_bonus.setOnClickListener(this)
......
...@@ -124,7 +124,7 @@ class MyFragment : BaseFragment(), ...@@ -124,7 +124,7 @@ class MyFragment : BaseFragment(),
initManager() initManager()
initView() initView()
initRecy() // initRecy()
} }
override fun onHiddenChanged(hidden: Boolean) { override fun onHiddenChanged(hidden: Boolean) {
...@@ -156,8 +156,8 @@ class MyFragment : BaseFragment(), ...@@ -156,8 +156,8 @@ class MyFragment : BaseFragment(),
} }
// 防止banner刷新太快 // 防止banner刷新太快
if (AntiShake.check(fl_my_banner?.id)) return // if (AntiShake.check(fl_my_banner?.id)) return
BannerManager.getTtBanner(TtCsjAdManager.TT_AD_BANNER_MY, fl_my_banner) // BannerManager.getTtBanner(TtCsjAdManager.TT_AD_BANNER_MY, fl_my_banner)
// 刷新喜马拉雅信息流 // 刷新喜马拉雅信息流
TTPreLoadExpressXmlyManager.getInstance().loadTtFrameLayout() TTPreLoadExpressXmlyManager.getInstance().loadTtFrameLayout()
...@@ -190,7 +190,7 @@ class MyFragment : BaseFragment(), ...@@ -190,7 +190,7 @@ class MyFragment : BaseFragment(),
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
fl_my_banner?.removeAllViews() // fl_my_banner?.removeAllViews()
BxmManager.onDestory() BxmManager.onDestory()
BannerManager.onDestroy() BannerManager.onDestroy()
myPresenter.detachView() myPresenter.detachView()
...@@ -207,7 +207,7 @@ class MyFragment : BaseFragment(), ...@@ -207,7 +207,7 @@ class MyFragment : BaseFragment(),
} }
myPresenter.getSignInHomePageMsg() myPresenter.getSignInHomePageMsg()
myPresenter.myHotActivity() // myPresenter.myHotActivity()
myPresenter.getHallBaseMsg() myPresenter.getHallBaseMsg()
userConfig = data userConfig = data
...@@ -224,15 +224,15 @@ class MyFragment : BaseFragment(), ...@@ -224,15 +224,15 @@ class MyFragment : BaseFragment(),
} }
override fun getMyHotActivitySuc(data: BannerBean?) { override fun getMyHotActivitySuc(data: BannerBean?) {
if (activity != null && !requireActivity().isFinishing) { // if (activity != null && !requireActivity().isFinishing) {
data?.let { // data?.let {
vp_grid.visibility = View.VISIBLE // vp_grid.visibility = View.VISIBLE
hotList.clear() // hotList.clear()
hotList.addAll(it.list) // hotList.addAll(it.list)
//
generateGridData(hotList) // generateGridData(hotList)
} // }
} // }
} }
// 生成热门活动数据 // 生成热门活动数据
...@@ -1154,7 +1154,7 @@ class MyFragment : BaseFragment(), ...@@ -1154,7 +1154,7 @@ class MyFragment : BaseFragment(),
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 iv_right_icon2.visibility = View.VISIBLE
...@@ -1174,31 +1174,31 @@ class MyFragment : BaseFragment(), ...@@ -1174,31 +1174,31 @@ class MyFragment : BaseFragment(),
// item_promotions_egv.onItemClickListener = 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)
} }
/** /**
...@@ -1412,11 +1412,11 @@ class MyFragment : BaseFragment(), ...@@ -1412,11 +1412,11 @@ class MyFragment : BaseFragment(),
fun turnDayTask() { fun turnDayTask() {
if (signCardBean != null) { if (signCardBean != null) {
scrollviewMy.scrollTo(0, llMyRoot.height - scrollviewMy.scrollTo(0, llMyRoot.height -
recy_my.height - // recy_my.height -
item_customer_service.height - // item_customer_service.height -
item_bottom_qqGroupNum.height - // item_bottom_qqGroupNum.height -
item_bottom_info.height - // item_bottom_info.height -
viewTitleDayTask.height - // viewTitleDayTask.height -
Utils.dip2px(context, 40f) Utils.dip2px(context, 40f)
) )
return return
...@@ -1426,11 +1426,11 @@ class MyFragment : BaseFragment(), ...@@ -1426,11 +1426,11 @@ class MyFragment : BaseFragment(),
activity?.runOnUiThread { activity?.runOnUiThread {
// scrollviewMy.scrollTo(0, llMyRoot.height - viewTitleDayTask.height) // scrollviewMy.scrollTo(0, llMyRoot.height - viewTitleDayTask.height)
scrollviewMy.scrollTo(0, llMyRoot.height - scrollviewMy.scrollTo(0, llMyRoot.height -
recy_my.height - // recy_my.height -
item_customer_service.height - // item_customer_service.height -
item_bottom_qqGroupNum.height - // item_bottom_qqGroupNum.height -
item_bottom_info.height - // item_bottom_info.height -
viewTitleDayTask.height - // viewTitleDayTask.height -
Utils.dip2px(context, 40f) Utils.dip2px(context, 40f)
) )
} }
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<LinearLayout <LinearLayout
android:visibility="gone"
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"
...@@ -55,6 +56,7 @@ ...@@ -55,6 +56,7 @@
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:visibility="gone"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
...@@ -72,6 +74,29 @@ ...@@ -72,6 +74,29 @@
android:textSize="11sp" /> android:textSize="11sp" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/tab_rl_four"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/tab_iv_four"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/tab_friends_btn" />
<TextView
android:id="@+id/tab_tv_four"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bottom_tab_friends"
android:textColor="@drawable/item_txt_sel"
android:textSize="11sp" />
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/tab_rl_three" android:id="@+id/tab_rl_three"
android:layout_width="0dp" android:layout_width="0dp"
...@@ -99,28 +124,7 @@ ...@@ -99,28 +124,7 @@
<!-- android:textSize="11sp" />--> <!-- android:textSize="11sp" />-->
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/tab_rl_four"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/tab_iv_four"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/tab_friends_btn" />
<TextView
android:id="@+id/tab_tv_four"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bottom_tab_friends"
android:textColor="@drawable/item_txt_sel"
android:textSize="11sp" />
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/tab_rl_five" android:id="@+id/tab_rl_five"
......
...@@ -36,31 +36,31 @@ ...@@ -36,31 +36,31 @@
<include layout="@layout/item_fragment_main_my_clock" /> <include layout="@layout/item_fragment_main_my_clock" />
<FrameLayout <!-- <FrameLayout-->
android:id="@+id/fl_my_banner" <!-- android:id="@+id/fl_my_banner"-->
android:layout_width="wrap_content" <!-- android:layout_width="wrap_content"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:layout_marginStart="12dp" <!-- android:layout_marginStart="12dp"-->
android:layout_marginEnd="12dp" <!-- android:layout_marginEnd="12dp"-->
android:background="@drawable/shape_bg_award" <!-- android:background="@drawable/shape_bg_award"-->
android:visibility="gone" /> <!-- android:visibility="gone" />-->
<include layout="@layout/item_divider_gray" /> <include layout="@layout/item_divider_gray" />
<include layout="@layout/item_fragment_main_my_promotions" /> <!-- <include layout="@layout/item_fragment_main_my_promotions" />-->
<include layout="@layout/item_divider_gray" /> <!-- <include layout="@layout/item_divider_gray" />-->
<include layout="@layout/view_title" /> <!-- <include layout="@layout/view_title" />-->
<androidx.recyclerview.widget.RecyclerView <!-- <androidx.recyclerview.widget.RecyclerView-->
android:id="@+id/recy_my" <!-- android:id="@+id/recy_my"-->
android:layout_width="match_parent" <!-- android:layout_width="match_parent"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:layout_marginStart="15dp" <!-- android:layout_marginStart="15dp"-->
android:layout_marginEnd="15dp" <!-- android:layout_marginEnd="15dp"-->
android:nestedScrollingEnabled="false" <!-- android:nestedScrollingEnabled="false"-->
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> <!-- app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />-->
<include layout="@layout/item_fragment_main_my_customer_service" /> <include layout="@layout/item_fragment_main_my_customer_service" />
......
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