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
b1311615
Commit
b1311615
authored
Feb 05, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
98809533
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
25 deletions
+13
-25
VideoAdingManager.java
.../java/com/mints/goodmoney/ad/video/VideoAdingManager.java
+1
-1
YlhVideoAdManager.java
.../java/com/mints/goodmoney/ad/video/YlhVideoAdManager.java
+1
-1
TaskPresenter.kt
.../java/com/mints/goodmoney/mvp/presenters/TaskPresenter.kt
+5
-3
MoneyFragment.kt
...ain/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
+6
-20
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/VideoAdingManager.java
View file @
b1311615
...
@@ -308,7 +308,7 @@ public class VideoAdingManager {
...
@@ -308,7 +308,7 @@ public class VideoAdingManager {
int
randomWeight
=
r
.
nextInt
(
weight
)
+
1
;
int
randomWeight
=
r
.
nextInt
(
weight
)
+
1
;
LogUtil
.
d
(
TAG
,
"2、权重随机值:"
+
randomWeight
);
LogUtil
.
d
(
TAG
,
"2、权重随机值:"
+
randomWeight
);
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
"权重随机值:"
+
randomWeight
);
//
ToastUtil.show(MintsApplication.getContext(), "权重随机值:" + randomWeight);
for
(
WeightBean
weightBean
:
weightList
)
{
for
(
WeightBean
weightBean
:
weightList
)
{
randomWeight
-=
weightBean
.
getWeight
();
randomWeight
-=
weightBean
.
getWeight
();
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/YlhVideoAdManager.java
View file @
b1311615
...
@@ -128,7 +128,7 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView
...
@@ -128,7 +128,7 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_MOREDIALOG_POSTID
();
ylhPostId
=
YlhAdManager
.
INSTANCE
.
getYLH_AD_VEDIO_MOREDIALOG_POSTID
();
break
;
break
;
}
}
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
"ylh vedio:"
+
ylhPostId
);
//
ToastUtil.show(MintsApplication.getContext(), "ylh vedio:" + ylhPostId);
if
(
rewardVideoAD
!=
null
)
{
if
(
rewardVideoAD
!=
null
)
{
rewardVideoAD
=
null
;
rewardVideoAD
=
null
;
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/TaskPresenter.kt
View file @
b1311615
...
@@ -15,7 +15,6 @@ import com.mints.goodmoney.utils.LogUtil
...
@@ -15,7 +15,6 @@ import com.mints.goodmoney.utils.LogUtil
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
com.mints.library.net.neterror.Throwable
import
com.mints.library.utils.json.JsonUtil
import
com.mints.library.utils.json.JsonUtil
import
kotlin.collections.HashMap
class
TaskPresenter
:
BasePresenter
<
TaskView
>()
{
class
TaskPresenter
:
BasePresenter
<
TaskView
>()
{
...
@@ -30,12 +29,15 @@ class TaskPresenter : BasePresenter<TaskView>() {
...
@@ -30,12 +29,15 @@ class TaskPresenter : BasePresenter<TaskView>() {
override
fun
onCompleted
()
{
override
fun
onCompleted
()
{
}
}
override
fun
onError
(
e
:
Throwable
)
{}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
JsonObject
>)
{
override
fun
onNext
(
baseResponse
:
BaseResponse
<
JsonObject
>)
{
if
(
isLinkView
)
return
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
val
data
=
baseResponse
.
data
val
data
=
baseResponse
.
data
when
(
code
)
{
when
(
code
)
{
200
->
{
200
->
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
View file @
b1311615
...
@@ -28,7 +28,8 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
...
@@ -28,7 +28,8 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
private
var
currentFragment
:
Fragment
?
=
null
private
var
currentFragment
:
Fragment
?
=
null
private
var
mainFragment
:
Fragment
?
=
null
private
var
mainFragment
:
Fragment
?
=
null
private
var
bookStoreFragment
:
Fragment
?
=
null
private
var
bookStoreFragment
:
Fragment
?
=
null
// private var newsFragment: Fragment? = null
// private var newsFragment: Fragment? = null
private
var
xmlyGameFragment
:
Fragment
?
=
null
private
var
xmlyGameFragment
:
Fragment
?
=
null
private
var
liebaoGameFragment
:
Fragment
?
=
null
private
var
liebaoGameFragment
:
Fragment
?
=
null
private
var
kuYinyueFragment
:
Fragment
?
=
null
private
var
kuYinyueFragment
:
Fragment
?
=
null
...
@@ -48,10 +49,6 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
...
@@ -48,10 +49,6 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
}
else
if
(
curPosition
==
3
)
{
}
else
if
(
curPosition
==
3
)
{
liebaoGameFragment
?.
onHiddenChanged
(
hidden
)
liebaoGameFragment
?.
onHiddenChanged
(
hidden
)
}
}
}
else
{
if
(
curPosition
==
1
)
{
liebaoGameFragment
?.
onHiddenChanged
(
hidden
)
}
}
}
super
.
onHiddenChanged
(
hidden
)
super
.
onHiddenChanged
(
hidden
)
...
@@ -109,14 +106,10 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
...
@@ -109,14 +106,10 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
currentFragment
=
xmlyGameFragment
currentFragment
=
xmlyGameFragment
}
}
xtFragmentMoney
.
setxTabDisplayNum
(
2
)
xtFragmentMoney
.
setxTabDisplayNum
(
1
)
val
newTab4
=
xtFragmentMoney
.
newTab
()
val
newTab4
=
xtFragmentMoney
.
newTab
()
newTab4
.
text
=
"听书"
newTab4
.
text
=
"听书"
val
newTab5
=
xtFragmentMoney
.
newTab
()
newTab5
.
text
=
"游戏"
// xtFragmentMoney.addTab(newTab3)
xtFragmentMoney
.
addTab
(
newTab4
)
xtFragmentMoney
.
addTab
(
newTab4
)
xtFragmentMoney
.
addTab
(
newTab5
)
xtFragmentMoney
.
addOnTabSelectedListener
(
this
)
xtFragmentMoney
.
addOnTabSelectedListener
(
this
)
}
}
...
@@ -191,17 +184,10 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
...
@@ -191,17 +184,10 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
}
}
1
->
{
1
->
{
if
(
AppConfig
.
showAdFlag
)
{
if
(
bookStoreFragment
==
null
)
{
if
(
bookStoreFragment
==
null
)
{
bookStoreFragment
=
ZhangyueFragment
()
bookStoreFragment
=
ZhangyueFragment
()
}
addOrShowFragment
(
childFragmentManager
,
bookStoreFragment
!!
,
FRAGMENT_TAG_BOOKSTORE
)
}
else
{
if
(
liebaoGameFragment
==
null
)
{
liebaoGameFragment
=
LiebaoGameFragment
()
}
addOrShowFragment
(
childFragmentManager
,
liebaoGameFragment
!!
,
FRAGMENT_TAG_GAME
)
}
}
addOrShowFragment
(
childFragmentManager
,
bookStoreFragment
!!
,
FRAGMENT_TAG_BOOKSTORE
)
}
}
// 2 -> {
// 2 -> {
// if (newsFragment == null) {
// if (newsFragment == null) {
...
...
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