Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_flowbox
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_flowbox
Commits
97978a6e
Commit
97978a6e
authored
Jul 23, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
底部tabBar按钮样式修改
parent
e7e14458
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
48 additions
and
40 deletions
+48
-40
MainActivity.kt
.../main/java/com/mints/flowbox/ui/activitys/MainActivity.kt
+6
-1
SpeedTestActivity.kt
.../java/com/mints/flowbox/ui/activitys/SpeedTestActivity.kt
+1
-3
HomeFragment.kt
...c/main/java/com/mints/flowbox/ui/fragment/HomeFragment.kt
+31
-33
tab_bonus_btn.xml
app/src/main/res/drawable/tab_bonus_btn.xml
+7
-0
tab_friends_btn.xml
app/src/main/res/drawable/tab_friends_btn.xml
+2
-2
activity_main.xml
app/src/main/res/layout/activity_main.xml
+1
-1
ic_friend_enable.png
app/src/main/res/mipmap-xhdpi/ic_friend_enable.png
+0
-0
ic_friend_none.png
app/src/main/res/mipmap-xhdpi/ic_friend_none.png
+0
-0
No files found.
app/src/main/java/com/mints/flowbox/ui/activitys/MainActivity.kt
View file @
97978a6e
...
...
@@ -8,6 +8,7 @@ import android.os.Bundle
import
android.text.TextUtils
import
android.view.KeyEvent
import
android.view.View
import
androidx.core.content.ContextCompat
import
androidx.fragment.app.Fragment
import
androidx.fragment.app.FragmentManager
import
androidx.fragment.app.FragmentTransaction
...
...
@@ -35,7 +36,6 @@ import com.mints.flowbox.ui.widgets.dialog.PowerDialog
import
com.mints.flowbox.utils.WifiUtils
import
com.mints.library.utils.GlideUtils
import
com.tbruyelle.rxpermissions.RxPermissions
import
com.yilan.sdk.common.util.PhoneUtil
import
kotlinx.android.synthetic.main.activity_main.*
import
net.phone.PhoneBrandUtils
import
rx.Observable
...
...
@@ -537,6 +537,11 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
AppConfig
.
HOME_BANNER_SIGN_GIVECASH
=
data
.
signGiveCash
AppConfig
.
FRAGMENT_THREE_SHOW_TYPE
=
data
.
signPageStatus
if
(
data
.
signPageStatus
==
3
)
{
tab_iv_four
.
background
=
ContextCompat
.
getDrawable
(
this
,
R
.
drawable
.
tab_friends_btn
)
tab_tv_four
.
text
=
"平台分红"
}
TrackManager
.
getInstance
().
updataCodeIdForPkgChannel
()
if
(
data
.
shareNews
!=
null
)
{
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/SpeedTestActivity.kt
View file @
97978a6e
...
...
@@ -6,8 +6,6 @@ import android.animation.ObjectAnimator
import
android.annotation.SuppressLint
import
android.app.Dialog
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
import
android.view.KeyEvent
import
android.view.View
import
android.view.animation.LinearInterpolator
...
...
@@ -112,7 +110,7 @@ class SpeedTestActivity : BaseActivity(), View.OnClickListener {
override
fun
onDestroy
()
{
super
.
onDestroy
()
WifiAdManager
.
instance
.
onDestroy
()
DownloadApkManager
.
instance
.
destroy
()
}
...
...
app/src/main/java/com/mints/flowbox/ui/fragment/HomeFragment.kt
View file @
97978a6e
...
...
@@ -46,8 +46,8 @@ private val TAG = HomeFragment::class.java.simpleName
/** 首页Fragment */
class
HomeFragment
:
BaseFragment
(),
WifiStateManager
.
WifiStateCallback
,
View
.
OnClickListener
,
HomeView
,
AdapterView
.
OnItemClickListener
,
WifiView
.
BubbleViewListener
,
OnItemChildClickListener
{
View
.
OnClickListener
,
HomeView
,
AdapterView
.
OnItemClickListener
,
WifiView
.
BubbleViewListener
,
OnItemChildClickListener
{
private
val
userManager
by
lazy
{
UserManager
.
getInstance
()
}
...
...
@@ -84,10 +84,10 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
private
fun
initRecy
()
{
recy_task
.
addItemDecoration
(
DividerItemDecoration
(
requireContext
(),
DividerItemDecoration
.
VERTICAL
)
DividerItemDecoration
(
requireContext
(),
DividerItemDecoration
.
VERTICAL
)
)
mainTurnAdapter
=
MainTurnAdapter
(
requireContext
(),
dataList
)
recy_task
.
adapter
=
mainTurnAdapter
...
...
@@ -192,21 +192,19 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
showToast
(
"网络异常,请检测网络"
)
return
}
WifiAdManager
.
instance
.
loadWifiAd
(
requireActivity
())
readyGo
(
SpeedTestActivity
::
class
.
java
)
}
// 内存清理
R
.
id
.
btn_clean
->
{
RxPermissions
(
requireActivity
())
.
request
(
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
)
.
subscribe
{
granted
:
Boolean
->
if
(
granted
)
{
WifiAdManager
.
instance
.
loadWifiAd
(
requireActivity
())
readyGo
(
CleanActivity
::
class
.
java
)
}
else
{
showMissingPermissionDialog
(
"存储"
)
}
.
request
(
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
)
.
subscribe
{
granted
:
Boolean
->
if
(
granted
)
{
readyGo
(
CleanActivity
::
class
.
java
)
}
else
{
showMissingPermissionDialog
(
"存储"
)
}
}
}
// 扫一扫
R
.
id
.
btn_scan
->
{
...
...
@@ -216,14 +214,14 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
}
RxPermissions
(
requireActivity
())
.
request
(
Manifest
.
permission
.
CAMERA
)
.
subscribe
{
granted
:
Boolean
->
if
(
granted
)
{
readyGo
(
ScanActivity
::
class
.
java
)
}
else
{
showMissingPermissionDialog
(
"拍照"
)
}
.
request
(
Manifest
.
permission
.
CAMERA
)
.
subscribe
{
granted
:
Boolean
->
if
(
granted
)
{
readyGo
(
ScanActivity
::
class
.
java
)
}
else
{
showMissingPermissionDialog
(
"拍照"
)
}
}
}
// wifi提速
R
.
id
.
btn_speed_fast
->
{
...
...
@@ -264,7 +262,7 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
override
fun
getBubbleSuc
(
count
:
Int
,
coin
:
Int
,
allIsComplete
:
Boolean
)
{
bubbleCoin
=
coin
wifi_view
.
setCount
(
count
,
allIsComplete
)
wifi_view
.
setCount
(
count
,
allIsComplete
)
if
(
wifiManager
.
isWifiEnable
)
{
bg_view
.
setBackgroundResource
(
R
.
mipmap
.
bg_home_enable
)
...
...
@@ -298,8 +296,8 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
for
(
i
in
0
until
pageCount
)
{
val
gridView
=
inflater
.
inflate
(
R
.
layout
.
item_fragment_main_my_promotions_gv
,
vp_grid
,
false
R
.
layout
.
item_fragment_main_my_promotions_gv
,
vp_grid
,
false
)
as
GridView
gridView
.
adapter
=
GvMyAdapter
(
requireActivity
(),
data
,
i
,
8
)
pagerList
.
add
(
gridView
)
...
...
@@ -337,7 +335,7 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
if
(
hotList
.
isNotEmpty
())
{
val
hotBean
:
BannerBean
.
ListBean
=
hotList
[
position
+
(
mCurrentIndex
*
8
)]
hotList
[
position
+
(
mCurrentIndex
*
8
)]
if
(!
TextUtils
.
isEmpty
(
hotBean
.
toUrl
))
{
// 自有界面
...
...
@@ -415,9 +413,9 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
pkgKey
=
taskBean
.
key
pkgName
=
taskBean
.
pkg
DownloadApkManager
.
instance
.
downloadApk
(
requireActivity
(),
taskBean
.
downloadUrl
,
pkgName
requireActivity
(),
taskBean
.
downloadUrl
,
pkgName
)
// 开启广播监听安装事件
registerBroad
()
...
...
@@ -426,12 +424,12 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
taskBean
.
coin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_FIRSTDOWNLOADS
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_FIRSTDOWNLOADS
)
bundle
.
putString
(
Constant
.
MAIN_EXTRA_ID
,
taskBean
.
key
Constant
.
MAIN_EXTRA_ID
,
taskBean
.
key
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
...
...
app/src/main/res/drawable/tab_bonus_btn.xml
0 → 100755
View file @
97978a6e
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@mipmap/ic_bonus_enable"
android:state_selected=
"true"
/>
<item
android:drawable=
"@mipmap/ic_bonus_none"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/tab_friends_btn.xml
View file @
97978a6e
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@mipmap/ic_
bonus
_enable"
android:state_selected=
"true"
/>
<item
android:drawable=
"@mipmap/ic_
bonus
_none"
/>
<item
android:drawable=
"@mipmap/ic_
friend
_enable"
android:state_selected=
"true"
/>
<item
android:drawable=
"@mipmap/ic_
friend
_none"
/>
</selector>
\ No newline at end of file
app/src/main/res/layout/activity_main.xml
View file @
97978a6e
...
...
@@ -99,7 +99,7 @@
android:id=
"@+id/tab_iv_four"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:src=
"@drawable/tab_
friend
s_btn"
/>
android:src=
"@drawable/tab_
bonu
s_btn"
/>
<TextView
android:id=
"@+id/tab_tv_four"
...
...
app/src/main/res/mipmap-xhdpi/ic_friend_enable.png
0 → 100644
View file @
97978a6e
1.96 KB
app/src/main/res/mipmap-xhdpi/ic_friend_none.png
0 → 100644
View file @
97978a6e
1.82 KB
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