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
25aba31f
Commit
25aba31f
authored
Jul 27, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化wifi页按钮点击无效问题
parent
0c0d9ccb
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
23 deletions
+31
-23
AppConfig.java
app/src/main/java/com/mints/flowbox/common/AppConfig.java
+0
-5
BindMobileActivity.kt
...java/com/mints/flowbox/ui/activitys/BindMobileActivity.kt
+4
-2
MoneyFragment.kt
.../main/java/com/mints/flowbox/ui/fragment/MoneyFragment.kt
+0
-9
WifiFragment.kt
...c/main/java/com/mints/flowbox/ui/fragment/WifiFragment.kt
+23
-5
fragment_main_my.xml
app/src/main/res/layout/fragment_main_my.xml
+4
-2
No files found.
app/src/main/java/com/mints/flowbox/common/AppConfig.java
View file @
25aba31f
...
@@ -182,11 +182,6 @@ public class AppConfig {
...
@@ -182,11 +182,6 @@ public class AppConfig {
*/
*/
public
static
int
groHighVideoAdCount
=
0
;
public
static
int
groHighVideoAdCount
=
0
;
/**
* xmly 是否初始化
*/
public
static
boolean
isXmlyInit
=
false
;
/**
/**
* 主页功能文字展示
* 主页功能文字展示
*/
*/
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/BindMobileActivity.kt
View file @
25aba31f
package
com.mints.flowbox.ui.activitys
package
com.mints.flowbox.ui.activitys
import
android.Manifest
import
android.Manifest
import
android.annotation.SuppressLint
import
android.text.TextUtils
import
android.text.TextUtils
import
android.view.View
import
android.view.View
import
com.mints.flowbox.R
import
com.mints.flowbox.R
...
@@ -58,13 +59,13 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener {
...
@@ -58,13 +59,13 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener {
loginPresenter
.
sendMobileBindingCode
(
mobile
)
loginPresenter
.
sendMobileBindingCode
(
mobile
)
}
}
R
.
id
.
tvLoginNext
->
{
R
.
id
.
tvLoginNext
->
{
var
mobile
=
etLoginMobile
.
getText
()
.
toString
().
trim
()
var
mobile
=
etLoginMobile
.
text
.
toString
().
trim
()
if
(
mobile
.
length
<
13
)
{
if
(
mobile
.
length
<
13
)
{
showToast
(
"请输入手机号"
)
showToast
(
"请输入手机号"
)
return
return
}
}
val
code
=
etLoginCode
.
getText
()
.
toString
().
trim
()
val
code
=
etLoginCode
.
text
.
toString
().
trim
()
if
(
code
.
length
<
4
)
{
if
(
code
.
length
<
4
)
{
showToast
(
"请输入验证码"
)
showToast
(
"请输入验证码"
)
return
return
...
@@ -125,6 +126,7 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener {
...
@@ -125,6 +126,7 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener {
var
num
=
0
var
num
=
0
var
run
:
Runnable
?
=
null
var
run
:
Runnable
?
=
null
@SuppressLint
(
"SetTextI18n"
)
fun
sendCodeThread
()
{
fun
sendCodeThread
()
{
num
=
60
num
=
60
tvLoginSendcode
?.
let
{
tvLoginSendcode
?.
let
{
...
...
app/src/main/java/com/mints/flowbox/ui/fragment/MoneyFragment.kt
View file @
25aba31f
...
@@ -5,12 +5,10 @@ import androidx.fragment.app.Fragment
...
@@ -5,12 +5,10 @@ import androidx.fragment.app.Fragment
import
androidx.fragment.app.FragmentManager
import
androidx.fragment.app.FragmentManager
import
androidx.fragment.app.FragmentTransaction
import
androidx.fragment.app.FragmentTransaction
import
com.androidkun.xtablayout.XTabLayout
import
com.androidkun.xtablayout.XTabLayout
import
com.mints.flowbox.MintsApplication
import
com.mints.flowbox.R
import
com.mints.flowbox.R
import
com.mints.flowbox.common.AppConfig
import
com.mints.flowbox.common.AppConfig
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.manager.UserManager
import
com.mints.flowbox.manager.UserManager
import
com.mints.flowbox.manager.YlVideoManager
import
com.mints.flowbox.ui.activitys.MainActivity
import
com.mints.flowbox.ui.activitys.MainActivity
import
com.mints.flowbox.ui.fragment.base.BaseFragment
import
com.mints.flowbox.ui.fragment.base.BaseFragment
import
kotlinx.android.synthetic.main.fragment_main_money.*
import
kotlinx.android.synthetic.main.fragment_main_money.*
...
@@ -37,13 +35,6 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
...
@@ -37,13 +35,6 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_money
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_money
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
if
(!
AppConfig
.
isXmlyInit
)
{
// XmManager.init(MintsApplication.getContext())
// 一览视频
YlVideoManager
.
init
(
MintsApplication
.
getContext
())
AppConfig
.
isXmlyInit
=
true
}
initView
()
initView
()
}
}
...
...
app/src/main/java/com/mints/flowbox/ui/fragment/WifiFragment.kt
View file @
25aba31f
...
@@ -146,7 +146,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -146,7 +146,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
// 校验是否有定位权限
// 校验是否有定位权限
if
(
ActivityCompat
.
checkSelfPermission
(
if
(
ActivityCompat
.
checkSelfPermission
(
requireContext
(),
requireContext
(),
Manifest
.
permission
.
ACCESS_
COARS
E_LOCATION
Manifest
.
permission
.
ACCESS_
FIN
E_LOCATION
)
!=
PackageManager
.
PERMISSION_GRANTED
)
!=
PackageManager
.
PERMISSION_GRANTED
)
{
)
{
// 校验是否已经连接上WIFI
// 校验是否已经连接上WIFI
...
@@ -563,7 +563,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -563,7 +563,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
)
)
}
}
}
else
{
}
else
{
RxPermissions
(
activity
!!
)
RxPermissions
(
requireActivity
()
)
.
request
(
.
request
(
Manifest
.
permission
.
ACCESS_FINE_LOCATION
,
Manifest
.
permission
.
ACCESS_FINE_LOCATION
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
...
@@ -606,13 +606,31 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -606,13 +606,31 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
}
}
override
fun
onItemClick
(
view
:
View
?,
position
:
Int
)
{
override
fun
onItemClick
(
view
:
View
?,
position
:
Int
)
{
if
(
!
wifiUtils
.
isWifiConnected
(
mContext
))
return
if
(
AntiShake
.
check
(
view
?.
id
))
return
view
?.
let
{
view
?.
let
{
if
(
it
.
id
==
R
.
id
.
btn
)
{
if
(
it
.
id
==
R
.
id
.
btn
)
{
if
(
ActivityCompat
.
checkSelfPermission
(
requireActivity
(),
Manifest
.
permission
.
ACCESS_FINE_LOCATION
)
!=
PackageManager
.
PERMISSION_GRANTED
)
{
checkPermission
()
checkPermission
()
return
return
}
}
// 未打开定位开关
if
(!
PermissionUtils
.
isOpenGps
(
mContext
))
{
openGpsSettings
()
return
}
if
(!
wifiUtils
.
isWifiConnected
(
mContext
)
||
!
wifiUtils
.
isWifiEnable
)
{
wifiUtils
.
openWifi
()
startActivity
(
Intent
(
Settings
.
ACTION_WIFI_SETTINGS
))
return
}
}
}
}
if
(
mWifiList
.
isNotEmpty
()
&&
mWifiList
[
position
].
isConnected
)
return
if
(
mWifiList
.
isNotEmpty
()
&&
mWifiList
[
position
].
isConnected
)
return
...
...
app/src/main/res/layout/fragment_main_my.xml
View file @
25aba31f
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"10dp"
android:layout_marginStart=
"10dp"
android:layout_marginEnd=
"10dp"
android:layout_marginEnd=
"10dp"
android:layout_marginBottom=
"10dp"
android:background=
"@drawable/shape_gold_card"
android:background=
"@drawable/shape_gold_card"
android:elevation=
"2dip"
android:elevation=
"2dip"
android:orientation=
"vertical"
android:orientation=
"vertical"
...
@@ -68,12 +69,13 @@
...
@@ -68,12 +69,13 @@
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- <include-->
<!-- <include-->
<!-- layout="@layout/item_fragment_main_my_customer_service" />-->
<!-- layout="@layout/item_fragment_main_my_customer_service" />-->
</LinearLayout>
</LinearLayout>
</FrameLayout>
</FrameLayout>
</androidx.core.widget.NestedScrollView>
</androidx.core.widget.NestedScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
\ No newline at end of file
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