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 {
*/
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
import
android.Manifest
import
android.annotation.SuppressLint
import
android.text.TextUtils
import
android.view.View
import
com.mints.flowbox.R
...
...
@@ -58,13 +59,13 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener {
loginPresenter
.
sendMobileBindingCode
(
mobile
)
}
R
.
id
.
tvLoginNext
->
{
var
mobile
=
etLoginMobile
.
getText
()
.
toString
().
trim
()
var
mobile
=
etLoginMobile
.
text
.
toString
().
trim
()
if
(
mobile
.
length
<
13
)
{
showToast
(
"请输入手机号"
)
return
}
val
code
=
etLoginCode
.
getText
()
.
toString
().
trim
()
val
code
=
etLoginCode
.
text
.
toString
().
trim
()
if
(
code
.
length
<
4
)
{
showToast
(
"请输入验证码"
)
return
...
...
@@ -125,6 +126,7 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener {
var
num
=
0
var
run
:
Runnable
?
=
null
@SuppressLint
(
"SetTextI18n"
)
fun
sendCodeThread
()
{
num
=
60
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
import
androidx.fragment.app.FragmentManager
import
androidx.fragment.app.FragmentTransaction
import
com.androidkun.xtablayout.XTabLayout
import
com.mints.flowbox.MintsApplication
import
com.mints.flowbox.R
import
com.mints.flowbox.common.AppConfig
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.manager.UserManager
import
com.mints.flowbox.manager.YlVideoManager
import
com.mints.flowbox.ui.activitys.MainActivity
import
com.mints.flowbox.ui.fragment.base.BaseFragment
import
kotlinx.android.synthetic.main.fragment_main_money.*
...
...
@@ -37,13 +35,6 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_money
override
fun
initViewsAndEvents
()
{
if
(!
AppConfig
.
isXmlyInit
)
{
// XmManager.init(MintsApplication.getContext())
// 一览视频
YlVideoManager
.
init
(
MintsApplication
.
getContext
())
AppConfig
.
isXmlyInit
=
true
}
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,
// 校验是否有定位权限
if
(
ActivityCompat
.
checkSelfPermission
(
requireContext
(),
Manifest
.
permission
.
ACCESS_
COARS
E_LOCATION
Manifest
.
permission
.
ACCESS_
FIN
E_LOCATION
)
!=
PackageManager
.
PERMISSION_GRANTED
)
{
// 校验是否已经连接上WIFI
...
...
@@ -563,7 +563,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
)
}
}
else
{
RxPermissions
(
activity
!!
)
RxPermissions
(
requireActivity
()
)
.
request
(
Manifest
.
permission
.
ACCESS_FINE_LOCATION
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
...
...
@@ -606,13 +606,31 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
}
override
fun
onItemClick
(
view
:
View
?,
position
:
Int
)
{
if
(
!
wifiUtils
.
isWifiConnected
(
mContext
))
return
if
(
AntiShake
.
check
(
view
?.
id
))
return
view
?.
let
{
if
(
it
.
id
==
R
.
id
.
btn
)
{
if
(
ActivityCompat
.
checkSelfPermission
(
requireActivity
(),
Manifest
.
permission
.
ACCESS_FINE_LOCATION
)
!=
PackageManager
.
PERMISSION_GRANTED
)
{
checkPermission
()
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
...
...
app/src/main/res/layout/fragment_main_my.xml
View file @
25aba31f
...
...
@@ -48,6 +48,7 @@
android:layout_height=
"wrap_content"
android:layout_marginStart=
"10dp"
android:layout_marginEnd=
"10dp"
android:layout_marginBottom=
"10dp"
android:background=
"@drawable/shape_gold_card"
android:elevation=
"2dip"
android:orientation=
"vertical"
...
...
@@ -68,12 +69,13 @@
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- <include-->
<!-- layout="@layout/item_fragment_main_my_customer_service" />-->
<!-- <include-->
<!-- layout="@layout/item_fragment_main_my_customer_service" />-->
</LinearLayout>
</FrameLayout>
</androidx.core.widget.NestedScrollView>
</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