Commit f1804f87 authored by jyx's avatar jyx

好赚钱审核包

parent 31bda680
......@@ -54,46 +54,48 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override fun initViewsAndEvents() {
ZhangyueManager.onCreateIreader(baseApplication)
showShortVedioLayout()
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_FIVE
if (moneyFragment == null) {
moneyFragment = MoneyFragment()
// showShortVedioLayout()
if (myFragment == null) {
myFragment = MyFragment()
}
if (!moneyFragment!!.isAdded) {
if (!myFragment!!.isAdded) {
// 提交事务
supportFragmentManager.beginTransaction()
.add(R.id.content_layout, moneyFragment!!).commitAllowingStateLoss()
.add(R.id.content_layout, myFragment!!).commitAllowingStateLoss()
// 记录当前Fragment
currentFragment = moneyFragment
currentFragment = myFragment
}
mainFriendsStatus=AppConfig.mainFriendsStatus
// 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)
// 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_rl_five.isSelected = true
tab_rl_five.isSelected = true
// tab_rl_one.setOnClickListener(this)
tab_rl_three.setOnClickListener(this)
tab_rl_two.setOnClickListener(this)
// tab_rl_two.setOnClickListener(this)
tab_rl_four.setOnClickListener(this)
tab_rl_five.setOnClickListener(this)
}
......
......@@ -88,10 +88,10 @@ class FriendsFragment(private var isResume: Boolean = false) : BaseFragment(), F
@SuppressLint("ClickableViewAccessibility")
private fun initView() {
tv_right_subtitle.visibility = View.VISIBLE
tv_right_subtitle.text = "玩法规则"
tv_right_subtitle.setTextColor(ContextCompat.getColor(mContext, R.color.color_666))
tv_right_subtitle.setOnClickListener { }
// tv_right_subtitle.visibility = View.VISIBLE
// tv_right_subtitle.text = "玩法规则"
// tv_right_subtitle.setTextColor(ContextCompat.getColor(mContext, R.color.color_666))
// tv_right_subtitle.setOnClickListener { }
tv_title.text = "瓜分百万现金福利"
btn_get_bonus.setOnClickListener(this)
......
......@@ -124,7 +124,7 @@ class MyFragment : BaseFragment(),
initManager()
initView()
initRecy()
// initRecy()
}
override fun onHiddenChanged(hidden: Boolean) {
......@@ -156,8 +156,8 @@ class MyFragment : BaseFragment(),
}
// 防止banner刷新太快
if (AntiShake.check(fl_my_banner?.id)) return
BannerManager.getTtBanner(TtCsjAdManager.TT_AD_BANNER_MY, fl_my_banner)
// if (AntiShake.check(fl_my_banner?.id)) return
// BannerManager.getTtBanner(TtCsjAdManager.TT_AD_BANNER_MY, fl_my_banner)
// 刷新喜马拉雅信息流
TTPreLoadExpressXmlyManager.getInstance().loadTtFrameLayout()
......@@ -190,7 +190,7 @@ class MyFragment : BaseFragment(),
override fun onDestroy() {
super.onDestroy()
fl_my_banner?.removeAllViews()
// fl_my_banner?.removeAllViews()
BxmManager.onDestory()
BannerManager.onDestroy()
myPresenter.detachView()
......@@ -207,7 +207,7 @@ class MyFragment : BaseFragment(),
}
myPresenter.getSignInHomePageMsg()
myPresenter.myHotActivity()
// myPresenter.myHotActivity()
myPresenter.getHallBaseMsg()
userConfig = data
......@@ -224,15 +224,15 @@ class MyFragment : BaseFragment(),
}
override fun getMyHotActivitySuc(data: BannerBean?) {
if (activity != null && !requireActivity().isFinishing) {
data?.let {
vp_grid.visibility = View.VISIBLE
hotList.clear()
hotList.addAll(it.list)
generateGridData(hotList)
}
}
// if (activity != null && !requireActivity().isFinishing) {
// data?.let {
// vp_grid.visibility = View.VISIBLE
// hotList.clear()
// hotList.addAll(it.list)
//
// generateGridData(hotList)
// }
// }
}
// 生成热门活动数据
......@@ -1154,7 +1154,7 @@ class MyFragment : BaseFragment(),
private fun initView() {
tv_title.text = "个人中心"
view_title.text = "每日任务"
// view_title.text = "每日任务"
iv_right_icon.visibility = View.VISIBLE
iv_right_icon.setImageResource(R.mipmap.ic_settings)
iv_right_icon2.visibility = View.VISIBLE
......@@ -1174,31 +1174,31 @@ class MyFragment : BaseFragment(),
// item_promotions_egv.onItemClickListener = this
vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrollStateChanged(state: Int) {
}
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
}
override fun onPageSelected(position: Int) {
mCurrentIndex = position
piv_grid.selection = position
}
})
// vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
// override fun onPageScrollStateChanged(state: Int) {
// }
//
// override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
// }
//
// override fun onPageSelected(position: Int) {
// mCurrentIndex = position
//
// piv_grid.selection = position
// }
//
// })
}
/**
* 初始化Recyclerview
*/
private fun initRecy() {
recy_my.addItemDecoration(DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL))
recy_my.setItemViewCacheSize(10)
mainMyAdapter = MainMyAdapter(mContext, dataList)
recy_my.adapter = mainMyAdapter
mainMyAdapter?.setOnItemChildClickListener(this)
// recy_my.addItemDecoration(DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL))
// recy_my.setItemViewCacheSize(10)
// mainMyAdapter = MainMyAdapter(mContext, dataList)
// recy_my.adapter = mainMyAdapter
// mainMyAdapter?.setOnItemChildClickListener(this)
}
/**
......@@ -1412,11 +1412,11 @@ class MyFragment : BaseFragment(),
fun turnDayTask() {
if (signCardBean != null) {
scrollviewMy.scrollTo(0, llMyRoot.height -
recy_my.height -
item_customer_service.height -
item_bottom_qqGroupNum.height -
item_bottom_info.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
......@@ -1426,11 +1426,11 @@ class MyFragment : BaseFragment(),
activity?.runOnUiThread {
// 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 -
// recy_my.height -
// item_customer_service.height -
// item_bottom_qqGroupNum.height -
// item_bottom_info.height -
// viewTitleDayTask.height -
Utils.dip2px(context, 40f)
)
}
......
......@@ -27,6 +27,7 @@
android:orientation="horizontal">
<LinearLayout
android:visibility="gone"
android:id="@+id/tab_rl_one"
android:layout_width="0dp"
android:layout_height="match_parent"
......@@ -55,6 +56,7 @@
android:layout_height="match_parent"
android:layout_weight="1.0"
android:gravity="center"
android:visibility="gone"
android:orientation="vertical">
<ImageView
......@@ -72,6 +74,29 @@
android:textSize="11sp" />
</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
android:id="@+id/tab_rl_three"
android:layout_width="0dp"
......@@ -99,28 +124,7 @@
<!-- android:textSize="11sp" />-->
</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
android:id="@+id/tab_rl_five"
......
......@@ -36,31 +36,31 @@
<include layout="@layout/item_fragment_main_my_clock" />
<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" />
<!-- <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_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
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" />
<!-- <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" />
......
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