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
ae26efe5
Commit
ae26efe5
authored
Nov 23, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化游戏切换
parent
506fe389
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
LoginActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/LoginActivity.kt
+3
-3
DhGameFragment.kt
...in/java/com/mints/goodmoney/ui/fragment/DhGameFragment.kt
+3
-0
MoneyFragment.kt
...ain/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
+5
-1
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/LoginActivity.kt
View file @
ae26efe5
...
@@ -80,7 +80,7 @@ class LoginActivity : BaseActivity()
...
@@ -80,7 +80,7 @@ class LoginActivity : BaseActivity()
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
):
Boolean
{
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
):
Boolean
{
return
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
return
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(!
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
))
{
if
(!
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
)
&&
!
loginFlag
)
{
finish
()
finish
()
}
}
true
true
...
@@ -93,7 +93,7 @@ class LoginActivity : BaseActivity()
...
@@ -93,7 +93,7 @@ class LoginActivity : BaseActivity()
when
(
v
?.
id
)
{
when
(
v
?.
id
)
{
R
.
id
.
ivLoginBack
->
{
R
.
id
.
ivLoginBack
->
{
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(!
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
))
{
if
(!
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
)
&&
!
loginFlag
)
{
finish
()
finish
()
}
}
}
}
...
@@ -193,7 +193,7 @@ class LoginActivity : BaseActivity()
...
@@ -193,7 +193,7 @@ class LoginActivity : BaseActivity()
}
}
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
))
{
if
(
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
)
&&
!
loginFlag
)
{
readyGo
(
MainActivity
::
class
.
java
)
readyGo
(
MainActivity
::
class
.
java
)
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/DhGameFragment.kt
View file @
ae26efe5
...
@@ -5,11 +5,14 @@ import android.content.Intent
...
@@ -5,11 +5,14 @@ import android.content.Intent
import
android.content.pm.ApplicationInfo
import
android.content.pm.ApplicationInfo
import
android.net.Uri
import
android.net.Uri
import
android.os.Build
import
android.os.Build
import
android.text.TextUtils
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
android.webkit.WebSettings
import
android.webkit.WebSettings
import
android.webkit.WebViewClient
import
android.webkit.WebViewClient
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.LogUtil
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
View file @
ae26efe5
...
@@ -19,6 +19,7 @@ import java.util.*
...
@@ -19,6 +19,7 @@ import java.util.*
class
MoneyFragment
:
BaseFragment
(),
XTabLayout
.
OnTabSelectedListener
{
class
MoneyFragment
:
BaseFragment
(),
XTabLayout
.
OnTabSelectedListener
{
private
var
mainFragment
:
MainFragment
?
=
null
private
var
mainFragment
:
MainFragment
?
=
null
private
var
dhGameFragment
:
DhGameFragment
?
=
null
private
var
curPosition
=
0
//当前标签选中的下标
private
var
curPosition
=
0
//当前标签选中的下标
...
@@ -31,6 +32,8 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
...
@@ -31,6 +32,8 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
override
fun
onHiddenChanged
(
hidden
:
Boolean
)
{
override
fun
onHiddenChanged
(
hidden
:
Boolean
)
{
if
(
curPosition
==
0
)
{
if
(
curPosition
==
0
)
{
mainFragment
?.
onHiddenChanged
(
hidden
)
mainFragment
?.
onHiddenChanged
(
hidden
)
}
else
if
(
curPosition
==
2
)
{
dhGameFragment
?.
onHiddenChanged
(
hidden
)
}
}
super
.
onHiddenChanged
(
hidden
)
super
.
onHiddenChanged
(
hidden
)
}
}
...
@@ -50,9 +53,10 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
...
@@ -50,9 +53,10 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
val
fragments
:
MutableList
<
Fragment
>
=
ArrayList
()
val
fragments
:
MutableList
<
Fragment
>
=
ArrayList
()
mainFragment
=
MainFragment
()
mainFragment
=
MainFragment
()
dhGameFragment
=
DhGameFragment
()
fragments
.
add
(
mainFragment
!!
)
fragments
.
add
(
mainFragment
!!
)
fragments
.
add
(
ZhangyueFragment
())
fragments
.
add
(
ZhangyueFragment
())
fragments
.
add
(
DhGameFragment
()
)
fragments
.
add
(
dhGameFragment
!!
)
//去除两侧应阴影
//去除两侧应阴影
vpFragmentMoney
.
overScrollMode
=
ViewPager
.
OVER_SCROLL_NEVER
vpFragmentMoney
.
overScrollMode
=
ViewPager
.
OVER_SCROLL_NEVER
...
...
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