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
99b7a69c
Commit
99b7a69c
authored
Mar 05, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化蘑菇星球
parent
4d71e0ed
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
48 additions
and
26 deletions
+48
-26
RTAVideoAdManager.kt
...in/java/com/mints/goodmoney/ad/video/RTAVideoAdManager.kt
+0
-1
VideoAdingManager.java
.../java/com/mints/goodmoney/ad/video/VideoAdingManager.java
+3
-3
MokuManager.kt
.../src/main/java/com/mints/goodmoney/manager/MokuManager.kt
+3
-0
VersionUpdatePresenter.java
...ints/goodmoney/mvp/presenters/VersionUpdatePresenter.java
+0
-4
UpdateService.java
.../main/java/com/mints/goodmoney/service/UpdateService.java
+6
-1
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+1
-1
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+33
-15
item_fragment_main_my_promotions.xml
.../src/main/res/layout/item_fragment_main_my_promotions.xml
+1
-1
progress_horizontal.xml
GoodMoney/app/src/main/res/layout/progress_horizontal.xml
+1
-0
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/RTAVideoAdManager.kt
View file @
99b7a69c
...
@@ -94,7 +94,6 @@ class RTAVideoAdManager private constructor(activity: Activity) : BaseVideoAd()
...
@@ -94,7 +94,6 @@ class RTAVideoAdManager private constructor(activity: Activity) : BaseVideoAd()
TrackManager
.
getInstance
().
reportClickAdEvent
()
TrackManager
.
getInstance
().
reportClickAdEvent
()
}
}
LogUtil
.
d
(
TAG
,
"onADClick"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_RTA
,
Constant
.
EVENT_TYPE_TWO
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_RTA
,
Constant
.
EVENT_TYPE_TWO
,
""
,
""
)
if
(
isClickScreen
)
{
if
(
isClickScreen
)
{
// 防止重复
// 防止重复
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/VideoAdingManager.java
View file @
99b7a69c
...
@@ -7,6 +7,7 @@ import android.content.Intent;
...
@@ -7,6 +7,7 @@ import android.content.Intent;
import
android.content.IntentFilter
;
import
android.content.IntentFilter
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.ad.video.base.VideoAdStatusListener
;
import
com.mints.goodmoney.ad.video.base.VideoAdStatusListener
;
import
com.mints.goodmoney.common.AppConfig
;
import
com.mints.goodmoney.common.AppConfig
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.common.Constant
;
...
@@ -16,6 +17,7 @@ import com.mints.goodmoney.mvp.model.WeightBean;
...
@@ -16,6 +17,7 @@ import com.mints.goodmoney.mvp.model.WeightBean;
import
com.mints.goodmoney.service.AppInstallService
;
import
com.mints.goodmoney.service.AppInstallService
;
import
com.mints.goodmoney.utils.AppUtil
;
import
com.mints.goodmoney.utils.AppUtil
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.ToastUtil
;
import
java.lang.ref.WeakReference
;
import
java.lang.ref.WeakReference
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -204,7 +206,7 @@ public class VideoAdingManager {
...
@@ -204,7 +206,7 @@ public class VideoAdingManager {
/**
/**
* 根据广告优先级获取下一个
* 根据广告优先级获取下一个
* 穿山甲->优量汇->穿山甲全屏->快手->珊瑚->闪电盒子->枫岚(兜底)
* 穿山甲->优量汇->穿山甲全屏->快手->珊瑚->闪电盒子->
RTA->
枫岚(兜底)
*/
*/
private
String
getNextAdType
()
{
private
String
getNextAdType
()
{
String
nextAdType
;
String
nextAdType
;
...
@@ -218,8 +220,6 @@ public class VideoAdingManager {
...
@@ -218,8 +220,6 @@ public class VideoAdingManager {
nextAdType
=
Constant
.
KS_VEDIO_AD
;
nextAdType
=
Constant
.
KS_VEDIO_AD
;
}
else
if
(
AppConfig
.
shVideoAdCount
>
0
)
{
}
else
if
(
AppConfig
.
shVideoAdCount
>
0
)
{
nextAdType
=
Constant
.
SH_VEDIO_AD
;
nextAdType
=
Constant
.
SH_VEDIO_AD
;
}
else
if
(
AppConfig
.
rtaVideoAdCount
>
0
)
{
nextAdType
=
Constant
.
RTA_VEDIO_AD
;
}
else
{
}
else
{
nextAdType
=
Constant
.
FL_VEDIO_AD
;
nextAdType
=
Constant
.
FL_VEDIO_AD
;
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/MokuManager.kt
View file @
99b7a69c
...
@@ -18,6 +18,9 @@ object MokuManager {
...
@@ -18,6 +18,9 @@ object MokuManager {
private
const
val
APP_SECRET
=
"421ec06a6f1dbd75010f6f9e4d821cfe03e3a7a3"
private
const
val
APP_SECRET
=
"421ec06a6f1dbd75010f6f9e4d821cfe03e3a7a3"
/**
* 若gotoMoku前 校验了权限方法,可不用init
*/
fun
init
(
activity
:
Activity
)
{
fun
init
(
activity
:
Activity
)
{
try
{
try
{
//初始化sdk
//初始化sdk
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/VersionUpdatePresenter.java
View file @
99b7a69c
...
@@ -273,12 +273,8 @@ public class VersionUpdatePresenter {
...
@@ -273,12 +273,8 @@ public class VersionUpdatePresenter {
mUpdateService
.
setUpdateNotification
(
new
UpdateService
.
UpdateNotification
()
{
mUpdateService
.
setUpdateNotification
(
new
UpdateService
.
UpdateNotification
()
{
@Override
@Override
public
void
updateProgress
(
int
progress
)
{
public
void
updateProgress
(
int
progress
)
{
if
(
pbDuUpdating
!=
null
)
{
if
(
pbDuUpdating
!=
null
)
{
pbDuUpdating
.
setProgress
(
progress
);
pbDuUpdating
.
setProgress
(
progress
);
if
(
btnDuUpdate
!=
null
&&
progress
==
100
)
{
btnDuUpdate
.
setEnabled
(
true
);
}
}
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/service/UpdateService.java
View file @
99b7a69c
...
@@ -59,6 +59,7 @@ public class UpdateService extends Service {
...
@@ -59,6 +59,7 @@ public class UpdateService extends Service {
if
(
updateFile
!=
null
)
{
if
(
updateFile
!=
null
)
{
createNotification
();
// 首次创建
createNotification
();
// 首次创建
createThread
();
// 线程下载
createThread
();
// 线程下载
}
}
}
else
{
}
else
{
stopService
();
stopService
();
...
@@ -172,7 +173,7 @@ public class UpdateService extends Service {
...
@@ -172,7 +173,7 @@ public class UpdateService extends Service {
contentView
.
setTextViewText
(
R
.
id
.
notificationPercent
,
contentView
.
setTextViewText
(
R
.
id
.
notificationPercent
,
msg
.
arg1
+
"%"
);
msg
.
arg1
+
"%"
);
contentView
.
setProgressBar
(
R
.
id
.
notificationProgress
,
10
0
,
contentView
.
setProgressBar
(
R
.
id
.
notificationProgress
,
5
0
,
msg
.
arg1
,
false
);
msg
.
arg1
,
false
);
notificationManager
.
notify
(
notification_id
,
notification
);
notificationManager
.
notify
(
notification_id
,
notification
);
...
@@ -278,6 +279,10 @@ public class UpdateService extends Service {
...
@@ -278,6 +279,10 @@ public class UpdateService extends Service {
message
.
what
=
DOWN_PROGRESS
;
message
.
what
=
DOWN_PROGRESS
;
message
.
arg1
=
updateCount
;
message
.
arg1
=
updateCount
;
handler
.
sendMessage
(
message
);
handler
.
sendMessage
(
message
);
System
.
out
.
println
(
"mcg __> downloadCount:"
+
downloadCount
);
System
.
out
.
println
(
"mcg __> updateCount:"
+
updateCount
);
System
.
out
.
println
(
"mcg __> down_step:"
+(
totalSize
));
}
}
}
}
if
(
httpURLConnection
!=
null
)
{
if
(
httpURLConnection
!=
null
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
99b7a69c
...
@@ -52,7 +52,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
...
@@ -52,7 +52,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
ZhangyueManager
.
onCreateIreader
(
baseApplication
)
ZhangyueManager
.
onCreateIreader
(
baseApplication
)
MokuManager
.
init
(
this
)
//
MokuManager.init(this)
showShortVedioLayout
()
showShortVedioLayout
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
99b7a69c
...
@@ -48,6 +48,7 @@ import com.mints.library.net.netstatus.NetUtils
...
@@ -48,6 +48,7 @@ import com.mints.library.net.netstatus.NetUtils
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.GlideUtils
import
com.mints.library.utils.GlideUtils
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.rd.animation.type.AnimationType
import
com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
import
com.tbruyelle.rxpermissions.RxPermissions
import
com.tbruyelle.rxpermissions.RxPermissions
...
@@ -260,21 +261,22 @@ class MyFragment : BaseFragment(),
...
@@ -260,21 +261,22 @@ class MyFragment : BaseFragment(),
mCurrentIndex
=
0
mCurrentIndex
=
0
piv_grid
.
count
=
pageCount
piv_grid
.
count
=
pageCount
piv_grid
.
setAnimationType
(
AnimationType
.
THIN_WORM
)
vp_grid
.
adapter
=
ViewPagerAdapter
(
pagerList
)
vp_grid
.
adapter
=
ViewPagerAdapter
(
pagerList
)
vp_grid
.
addOnPageChangeListener
(
object
:
ViewPager
.
OnPageChangeListener
{
//
vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override
fun
onPageScrollStateChanged
(
state
:
Int
)
{
//
override fun onPageScrollStateChanged(state: Int) {
}
//
}
//
override
fun
onPageScrolled
(
position
:
Int
,
positionOffset
:
Float
,
positionOffsetPixels
:
Int
)
{
//
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
}
//
}
//
override
fun
onPageSelected
(
position
:
Int
)
{
//
override fun onPageSelected(position: Int) {
mCurrentIndex
=
position
//
mCurrentIndex = position
//
piv_grid
.
selection
=
position
//
piv_grid.selection = position
}
//
}
//
})
//
})
}
}
override
fun
getSignInHomePageMsgSuc
(
signBean
:
SignCardBean
?)
{
override
fun
getSignInHomePageMsgSuc
(
signBean
:
SignCardBean
?)
{
...
@@ -1172,6 +1174,21 @@ class MyFragment : BaseFragment(),
...
@@ -1172,6 +1174,21 @@ class MyFragment : BaseFragment(),
item_customer_service
.
setOnClickListener
(
this
)
item_customer_service
.
setOnClickListener
(
this
)
// item_promotions_egv.onItemClickListener = this
// item_promotions_egv.onItemClickListener = this
vp_grid
.
addOnPageChangeListener
(
object
:
ViewPager
.
OnPageChangeListener
{
override
fun
onPageScrollStateChanged
(
state
:
Int
)
{
}
override
fun
onPageScrolled
(
position
:
Int
,
positionOffset
:
Float
,
positionOffsetPixels
:
Int
)
{
}
override
fun
onPageSelected
(
position
:
Int
)
{
mCurrentIndex
=
position
piv_grid
.
selection
=
position
}
})
}
}
/**
/**
...
@@ -1435,7 +1452,8 @@ class MyFragment : BaseFragment(),
...
@@ -1435,7 +1452,8 @@ class MyFragment : BaseFragment(),
private
fun
gotoMoku
()
{
private
fun
gotoMoku
()
{
RxPermissions
(
requireActivity
())
RxPermissions
(
requireActivity
())
.
request
(
Manifest
.
permission
.
READ_PHONE_STATE
,
.
request
(
Manifest
.
permission
.
READ_PHONE_STATE
,
Manifest
.
permission
.
READ_EXTERNAL_STORAGE
)
Manifest
.
permission
.
READ_EXTERNAL_STORAGE
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
)
.
subscribe
{
granted
:
Boolean
->
.
subscribe
{
granted
:
Boolean
->
if
(
granted
)
{
if
(
granted
)
{
MokuManager
.
gotoMoku
(
requireContext
())
MokuManager
.
gotoMoku
(
requireContext
())
...
...
GoodMoney/app/src/main/res/layout/item_fragment_main_my_promotions.xml
View file @
99b7a69c
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:visibility=
"gone"
android:layout_marginTop=
"8dp"
android:layout_marginTop=
"8dp"
android:layout_marginBottom=
"8dp"
android:layout_marginBottom=
"8dp"
android:visibility=
"gone"
app:piv_count=
"2"
app:piv_count=
"2"
app:piv_selectedColor=
"@color/color_FF9837"
app:piv_selectedColor=
"@color/color_FF9837"
app:piv_unselectedColor=
"@color/color_20000000"
app:piv_unselectedColor=
"@color/color_20000000"
...
...
GoodMoney/app/src/main/res/layout/progress_horizontal.xml
View file @
99b7a69c
...
@@ -20,5 +20,6 @@
...
@@ -20,5 +20,6 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@null"
android:background=
"@null"
android:max=
"60"
android:indeterminateOnly=
"false"
android:indeterminateOnly=
"false"
android:progressDrawable=
"@drawable/progress_bar_horizontal"
/>
android:progressDrawable=
"@drawable/progress_bar_horizontal"
/>
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