Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_goodmoney
Commits
f1804f87
Commit
f1804f87
authored
Mar 19, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
好赚钱审核包
parent
31bda680
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
124 additions
and
118 deletions
+124
-118
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+32
-30
FriendsFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
+4
-4
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+44
-44
activity_main.xml
GoodMoney/app/src/main/res/layout/activity_main.xml
+25
-21
fragment_main_my.xml
GoodMoney/app/src/main/res/layout/fragment_main_my.xml
+19
-19
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
f1804f87
...
...
@@ -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
(!
m
one
yFragment
!!
.
isAdded
)
{
if
(!
myFragment
!!
.
isAdded
)
{
// 提交事务
supportFragmentManager
.
beginTransaction
()
.
add
(
R
.
id
.
content_layout
,
m
one
yFragment
!!
).
commitAllowingStateLoss
()
.
add
(
R
.
id
.
content_layout
,
myFragment
!!
).
commitAllowingStateLoss
()
// 记录当前Fragment
currentFragment
=
m
one
yFragment
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_on
e
.
isSelected
=
true
tab_
tv_on
e
.
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_fiv
e
.
isSelected
=
true
tab_
rl_fiv
e
.
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
)
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
View file @
f1804f87
...
...
@@ -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
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
f1804f87
...
...
@@ -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
)
)
}
...
...
GoodMoney/app/src/main/res/layout/activity_main.xml
View file @
f1804f87
...
...
@@ -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"
...
...
GoodMoney/app/src/main/res/layout/fragment_main_my.xml
View file @
f1804f87
...
...
@@ -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"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment