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
df7344c2
Commit
df7344c2
authored
Nov 18, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
c2dcd88d
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
144 additions
and
4 deletions
+144
-4
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+3
-0
MorningClockPresenter.java
...mints/goodmoney/mvp/presenters/MorningClockPresenter.java
+53
-0
MorningClockView.kt
...in/java/com/mints/goodmoney/mvp/views/MorningClockView.kt
+5
-0
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+1
-1
MorningClockActivity.kt
.../com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
+50
-0
DhGameFragment.kt
...in/java/com/mints/goodmoney/ui/fragment/DhGameFragment.kt
+6
-0
HorizChannelFragment.kt
...a/com/mints/goodmoney/ui/fragment/HorizChannelFragment.kt
+7
-2
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+2
-0
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+1
-0
CountDownVedioView.java
...va/com/mints/goodmoney/ui/widgets/CountDownVedioView.java
+4
-0
activity_morning_clock.xml
GoodMoney/app/src/main/res/layout/activity_morning_clock.xml
+11
-0
view_countdown_vedio.xml
GoodMoney/app/src/main/res/layout/view_countdown_vedio.xml
+1
-1
ic_main_grey.png
GoodMoney/app/src/main/res/mipmap-xhdpi/ic_main_grey.png
+0
-0
ic_main_red.png
GoodMoney/app/src/main/res/mipmap-xhdpi/ic_main_red.png
+0
-0
No files found.
GoodMoney/app/src/main/AndroidManifest.xml
View file @
df7344c2
...
...
@@ -160,6 +160,9 @@
<activity
android:name=
".ui.activitys.SplashADActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.MorningClockActivity"
android:screenOrientation=
"portrait"
/>
<service
android:name=
".service.UpdateService"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/MorningClockPresenter.java
0 → 100755
View file @
df7344c2
package
com
.
mints
.
goodmoney
.
mvp
.
presenters
;
import
com.mints.goodmoney.manager.AppHttpManager
;
import
com.mints.goodmoney.mvp.model.BaseResponse
;
import
com.mints.goodmoney.mvp.model.DrawcashBean
;
import
com.mints.goodmoney.mvp.views.MorningClockView
;
import
com.mints.library.net.neterror.BaseSubscriber
;
import
com.mints.library.net.neterror.Throwable
;
public
class
MorningClockPresenter
extends
BasePresenter
<
MorningClockView
>
{
/**
* 获取用户配置信息
*/
public
void
getUserTaskMsg
()
{
view
.
showLoading
(
"加载中..."
);
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getDrawcashUserTaskMsg
(),
new
BaseSubscriber
<
BaseResponse
<
DrawcashBean
>>()
{
@Override
public
void
onCompleted
()
{
if
(
isLinkView
())
return
;
view
.
hideLoading
();
}
@Override
public
void
onError
(
Throwable
e
)
{
if
(
isLinkView
())
return
;
view
.
hideLoading
();
view
.
showToast
(
e
.
getMessage
());
}
@Override
public
void
onNext
(
BaseResponse
<
DrawcashBean
>
baseResponse
)
{
if
(
isLinkView
())
return
;
int
code
=
baseResponse
.
getStatus
();
String
message
=
baseResponse
.
getMessage
();
switch
(
code
)
{
case
200
:
//成功
break
;
default
:
view
.
showToast
(
message
);
break
;
}
}
});
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/MorningClockView.kt
0 → 100644
View file @
df7344c2
package
com.mints.goodmoney.mvp.views
interface
MorningClockView
:
BaseView
{
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
df7344c2
...
...
@@ -103,7 +103,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
awardPresenter
.
reportAddCoinMsg
(
vo
)
tvAwardContent
.
setText
(
curCoin
.
toString
()
+
"金币已到账"
)
tvAwardNext
.
setText
(
"
金币翻倍
"
)
tvAwardNext
.
setText
(
"
看视频赚${extraId}金币
"
)
carrierType
=
Constant
.
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
0 → 100644
View file @
df7344c2
package
com.mints.goodmoney.ui.activitys
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.mvp.presenters.DrawcashPresenter
import
com.mints.goodmoney.mvp.presenters.MorningClockPresenter
import
com.mints.goodmoney.mvp.views.MorningClockView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
kotlinx.android.synthetic.main.header_layout.*
/**
* 描述:早起打卡
* 作者:孟崔广
* 时间:2020/11/18 19:19
*/
class
MorningClockActivity
:
BaseActivity
()
,
View
.
OnClickListener
,
MorningClockView
{
private
val
morningClockPresenter
by
lazy
{
MorningClockPresenter
()
}
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_morning_clock
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
initViewsAndEvents
()
{
tv_title
.
text
=
"早起打卡"
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
initListener
()
morningClockPresenter
.
attachView
(
this
)
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
morningClockPresenter
.
detachView
()
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
R
.
id
.
iv_left_icon
->
finish
()
}
}
private
fun
initListener
()
{
iv_left_icon
.
setOnClickListener
(
this
)
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/DhGameFragment.kt
View file @
df7344c2
...
...
@@ -41,6 +41,12 @@ class DhGameFragment : LazyLoadBaseFragment(), View.OnClickListener {
initListener
()
}
override
fun
onFragmentPause
()
{
if
(
UserManager
.
getInstance
().
userIsLogin
())
{
loadH5Game
()
}
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/HorizChannelFragment.kt
View file @
df7344c2
...
...
@@ -17,13 +17,16 @@ import com.mints.goodmoney.ui.fragment.base.BaseFragment
import
com.yilan.sdk.player.ylplayer.YLPlayerConfig
import
com.yilan.sdk.player.ylplayer.callback.OnPlayerCallBack
import
com.yilan.sdk.ui.category.ChannelFragment
import
kotlinx.android.synthetic.main.fragment_horiz_channel.cdvvYilanTime
import
kotlinx.android.synthetic.main.fragment_horiz_channel.vs_tips
import
kotlinx.android.synthetic.main.fragment_main_first.*
import
net.grandcentrix.tray.AppPreferences
import
kotlinx.android.synthetic.main.fragment_horiz_channel.*
private
val
TAG
=
HorizChannelFragment
::
class
.
java
.
simpleName
class
HorizChannelFragment
:
BaseFragment
(),
HorizChannelView
,
View
.
OnClickListener
{
private
val
TAG
=
HorizChannelFragment
::
class
.
java
.
simpleName
private
val
horizChannelPresenter
by
lazy
{
HorizChannelPresenter
()
}
private
val
ps
by
lazy
{
AppPreferences
(
context
)
}
...
...
@@ -64,6 +67,7 @@ class HorizChannelFragment : BaseFragment(), HorizChannelView, View.OnClickListe
// 防止界面切换 重置倒计时
// 第一次能过 isFirstLoadVedio 判断好兔先加载视频
if
(!
isFirstLoadVideo
&&
!
cdvvYilanTime
.
isPlaying
&&
!
isAward
)
{
cdvvYilanTime
.
setRedpkgImg
(
R
.
mipmap
.
ic_main_grey
)
cdvvYilanTime
?.
reset
()
cdvvYilanTime
?.
start
()
}
...
...
@@ -224,6 +228,7 @@ class HorizChannelFragment : BaseFragment(), HorizChannelView, View.OnClickListe
isFirstWatchVideo
=
false
}
cdvvYilanTime
.
setRedpkgImg
(
R
.
mipmap
.
ic_main_red
)
// 转满一圈,可领金币标记
isAward
=
true
cdvvYilanTime
?.
showRedbox
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
df7344c2
...
...
@@ -241,6 +241,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 防止界面切换 重置倒计时
// 好兔视频已加载 且 红包已转满 且 奖励已领过
if
(!
isFirstLoadVedio
&&
!
cdvvYilanTime
.
isPlaying
&&
!
isAward
)
{
cdvvYilanTime
.
setRedpkgImg
(
R
.
mipmap
.
ic_main_grey
)
cdvvYilanTime
?.
reset
()
cdvvYilanTime
?.
start
()
}
...
...
@@ -388,6 +389,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
isFirstWatchVideo
=
false
}
cdvvYilanTime
.
setRedpkgImg
(
R
.
mipmap
.
ic_main_red
)
// 转满一圈,可领金币标记
isAward
=
true
cdvvYilanTime
?.
showRedbox
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
df7344c2
...
...
@@ -456,6 +456,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
taskBean
.
otherConfig
.
coin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CHALLENGE_SHAREFRIEND
)
bundle
.
putString
(
Constant
.
MAIN_EXTRA_ID
,
taskBean
.
otherConfig
.
doubleCoin
.
toString
())
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
2
->
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/CountDownVedioView.java
View file @
df7344c2
...
...
@@ -92,6 +92,10 @@ public class CountDownVedioView extends LinearLayout {
cdCountVedioView
.
setTime
(
time
);
}
public
void
setRedpkgImg
(
int
img
){
ivCountVedioRedbox
.
setImageResource
(
img
);
}
public
void
setCountDownVedioListener
(
CountDownVedioListener
countDownVedioListener
)
{
this
.
countDownVedioListener
=
countDownVedioListener
;
}
...
...
GoodMoney/app/src/main/res/layout/activity_morning_clock.xml
0 → 100644
View file @
df7344c2
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<include
layout=
"@layout/header_layout"
/>
</LinearLayout>
GoodMoney/app/src/main/res/layout/view_countdown_vedio.xml
View file @
df7344c2
...
...
@@ -27,5 +27,5 @@
android:layout_width=
"24dp"
android:layout_height=
"28dp"
android:layout_gravity=
"center"
android:src=
"@mipmap/ic_
count_red
"
/>
android:src=
"@mipmap/ic_
main_grey
"
/>
</FrameLayout>
GoodMoney/app/src/main/res/mipmap-xhdpi/ic_main_grey.png
0 → 100644
View file @
df7344c2
1.19 KB
GoodMoney/app/src/main/res/mipmap-xhdpi/ic_
count
_red.png
→
GoodMoney/app/src/main/res/mipmap-xhdpi/ic_
main
_red.png
View file @
df7344c2
File moved
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