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
e5052e39
Commit
e5052e39
authored
Nov 25, 2020
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
戳我分红及签到翻倍金币动画
parent
3d680e8e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
73 additions
and
63 deletions
+73
-63
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+0
-6
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+3
-3
FriendsFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
+33
-2
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+1
-1
SignView.java
...rc/main/java/com/mints/goodmoney/ui/widgets/SignView.java
+25
-46
shape_btn_friends_unenabled.xml
...app/src/main/res/drawable/shape_btn_friends_unenabled.xml
+1
-1
fragment_main_friends.xml
GoodMoney/app/src/main/res/layout/fragment_main_friends.xml
+3
-4
view_sign.xml
GoodMoney/app/src/main/res/layout/view_sign.xml
+7
-0
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
e5052e39
...
...
@@ -108,12 +108,6 @@ object Constant {
const
val
CARRIER_SMALLHOMEVEDIO_DOUBLE
=
"SMALLHOMEVEDIO_DOUBLE"
//首页红包翻倍
const
val
CARRIER_MORNING_CLOCK
=
"MORNING_CLOCK"
//早上打卡
const
val
SHAREFRIEND_COMPLETE_1
=
"SHAREFRIEND_COMPLETE_1"
//邀请任务1
const
val
SHAREFRIEND_COMPLETE_2
=
"SHAREFRIEND_COMPLETE_2"
//邀请任务2
const
val
SHAREFRIEND_COMPLETE_3
=
"SHAREFRIEND_COMPLETE_3"
//邀请任务3
const
val
SHAREFRIEND_COMPLETE_4
=
"SHAREFRIEND_COMPLETE_4"
//邀请任务4
const
val
SHAREFRIEND_COMPLETE_5
=
"SHAREFRIEND_COMPLETE_5"
//邀请任务5
const
val
SHAREFRIEND_COMPLETE_6
=
"SHAREFRIEND_COMPLETE_6"
//邀请任务6
const
val
CHALLENGE_SHAREFRIEND
=
"CHALLENGE_SHAREFRIEND"
//邀请好友
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
e5052e39
...
...
@@ -66,9 +66,6 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
startTime
()
when
(
carrierType
)
{
Constant
.
SHAREFRIEND_COMPLETE_1
,
Constant
.
SHAREFRIEND_COMPLETE_2
,
Constant
.
SHAREFRIEND_COMPLETE_3
,
Constant
.
SHAREFRIEND_COMPLETE_4
,
Constant
.
SHAREFRIEND_COMPLETE_5
,
Constant
.
SHAREFRIEND_COMPLETE_6
,
Constant
.
CARRIER_GAME_ONLINE
,
Constant
.
CARRIER_EATMEAL
->
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
...
...
@@ -155,6 +152,9 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
tvAwardContent
.
setText
(
"+"
+
curCoin
+
"金币"
)
tvAwardNext
.
setText
(
"看视频领取"
)
}
Constant
.
CARRIER_VERSUS_VIDEO
->{
tvAwardContent
.
setText
(
curCoin
.
toString
()
+
"金币已到账"
)
}
else
->
{
tvAwardContent
.
setText
(
curCoin
.
toString
()
+
"金币已到账"
)
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
View file @
e5052e39
...
...
@@ -3,6 +3,7 @@ package com.mints.goodmoney.ui.fragment
import
android.annotation.SuppressLint
import
android.text.TextUtils
import
android.view.View
import
android.view.animation.AccelerateDecelerateInterpolator
import
androidx.core.content.ContextCompat
import
androidx.recyclerview.widget.DividerItemDecoration
import
androidx.recyclerview.widget.RecyclerView
...
...
@@ -10,6 +11,8 @@ import androidx.viewpager.widget.ViewPager
import
cn.sharesdk.framework.Platform
import
cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.wechat.friends.Wechat
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
...
...
@@ -60,6 +63,8 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
private
var
bonusDialog
:
BonusDialog
?
=
null
private
var
rope
:
YoYo
.
YoYoString
?
=
null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_friends
override
fun
initViewsAndEvents
()
{
...
...
@@ -180,6 +185,10 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
override
fun
onDestroy
()
{
super
.
onDestroy
()
friendsPresenter
.
detachView
()
if
(
rope
!=
null
)
{
rope
?.
stop
()
rope
=
null
}
}
override
fun
onRefresh
(
refreshLayout
:
RefreshLayout
)
{
...
...
@@ -203,6 +212,23 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
}
}
/**
* 显示红包动画
*/
fun
showRedbox
(
view
:
View
?)
{
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
1200
)
.
interpolate
(
AccelerateDecelerateInterpolator
())
.
repeat
(-
1
)
.
playOn
(
view
)
}
fun
stopRedbox
()
{
if
(
rope
!=
null
)
{
rope
?.
stop
()
}
}
private
fun
generateData
(
data
:
FriendHallMsgBean
)
{
friends_sum
.
text
=
""
+
data
.
friendCount
friends_directly_sum
.
text
=
""
+
data
.
directFriendsCount
...
...
@@ -210,12 +236,17 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
btn_get_bonus
.
text
=
data
.
button
btn_get_bonus
.
isEnabled
=
data
.
status
==
0
&&
data
.
cash
>
0
if
(
btn_get_bonus
.
isEnabled
)
{
showRedbox
(
btn_get_bonus
)
}
else
{
stopRedbox
()
}
tv_bonus_date
.
text
=
data
.
periods
tv_bonus_sum
.
text
=
SpanUtils
()
.
append
(
"
预计总分红
"
).
setForegroundColor
(
resources
.
getColor
(
R
.
color
.
black
))
.
append
(
data
.
titleMsg
).
setFontSize
(
52
).
setForegroundColor
(
resources
.
getColor
(
R
.
color
.
color_E72C2B
))
.
append
(
"
今日奖池
"
).
setForegroundColor
(
resources
.
getColor
(
R
.
color
.
black
))
.
append
(
data
.
titleMsg
).
setFontSize
(
60
).
setForegroundColor
(
resources
.
getColor
(
R
.
color
.
color_E72C2B
))
.
append
(
" 元"
).
setForegroundColor
(
resources
.
getColor
(
R
.
color
.
black
))
.
create
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
e5052e39
package
com.mints.goodmoney.ui.fragment
import
android.Manifest
import
android.annotation.SuppressLint
import
android.content.ClipData
import
android.content.ClipboardManager
...
...
@@ -158,6 +157,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
override
fun
onDestroy
()
{
super
.
onDestroy
()
BxmManager
.
onDestory
()
item_clock_signview
.
onDestory
()
myPresenter
.
detachView
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/SignView.java
View file @
e5052e39
...
...
@@ -9,6 +9,8 @@ import android.widget.TextView;
import
androidx.annotation.Nullable
;
import
com.daimajia.androidanimations.library.Techniques
;
import
com.daimajia.androidanimations.library.YoYo
;
import
com.mints.goodmoney.R
;
import
com.mints.goodmoney.mvp.model.SignViewBean
;
import
com.mints.library.utils.nodoubleclick.AntiShake
;
...
...
@@ -38,6 +40,8 @@ public class SignView extends LinearLayout implements View.OnClickListener {
private
TextView
tvSixday
;
private
TextView
tvSevenday
;
private
YoYo
.
YoYoString
rope
;
public
SignView
(
Context
context
)
{
this
(
context
,
null
);
}
...
...
@@ -161,14 +165,25 @@ public class SignView extends LinearLayout implements View.OnClickListener {
}
}
// public void setSevenAnim(int signDays, int status) {
// if (status == 0 && signDays == 7 && tvSeven != null) {
// YoYo.with(Techniques.Swing).duration(1200)
// .interpolate(new AccelerateDecelerateInterpolator())
// .repeat(15)
// .playOn(tvSeven);
// }
// }
/**
* 显示红包动画
*/
public
void
showRedbox
(
View
view
)
{
rope
=
YoYo
.
with
(
Techniques
.
Tada
).
duration
(
1000
).
repeat
(-
1
).
playOn
(
view
);
}
public
void
stopRedbox
()
{
if
(
rope
!=
null
)
{
rope
.
stop
();
}
}
public
void
onDestory
()
{
if
(
rope
!=
null
)
{
rope
.
stop
();
rope
=
null
;
}
}
/**
* 设置文字样式
...
...
@@ -199,7 +214,9 @@ public class SignView extends LinearLayout implements View.OnClickListener {
tvContent
.
setBackground
(
resources
.
getDrawable
(
R
.
mipmap
.
ic_sign_video
));
tvDay
.
setTextColor
(
resources
.
getColor
(
R
.
color
.
black
));
tvDay
.
setText
(
"可翻倍"
);
showRedbox
(
tvContent
);
}
else
{
stopRedbox
();
if
(
days
==
7
)
{
tvContent
.
setBackground
(
resources
.
getDrawable
(
R
.
mipmap
.
ic_sign_newgift_open
));
...
...
@@ -237,44 +254,6 @@ public class SignView extends LinearLayout implements View.OnClickListener {
tvDay
.
setTextColor
(
resources
.
getColor
(
R
.
color
.
black
));
break
;
}
// } else {
// switch (status) {
// case 0:
// if (days == 7) {
// tvContent.setText("");
// tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_close));
//
// } else {
// tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_finish));
// }
// tvDay.setTextColor(resources.getColor(R.color.black));
// break;
// case 1:
// case 2:
// if (days == 7) {
// tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_open));
//
// } else {
// tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_none));
// }
//
// tvContent.setText("");
// tvContent.setTextColor(resources.getColor(R.color.graya));
// tvDay.setTextColor(resources.getColor(R.color.graya));
// tvDay.setText("已领");
// break;
// default:
// if (days == 7) {
// tvContent.setText("");
// tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_close));
// } else {
// tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_finish));
// }
// tvDay.setTextColor(resources.getColor(R.color.black));
// break;
// }
// }
}
...
...
GoodMoney/app/src/main/res/drawable/shape_btn_friends_unenabled.xml
View file @
e5052e39
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/
graygai
"
/>
<solid
android:color=
"@color/
main_mints
"
/>
<corners
android:radius=
"100dp"
/>
...
...
GoodMoney/app/src/main/res/layout/fragment_main_friends.xml
View file @
e5052e39
...
...
@@ -94,7 +94,7 @@
android:layout_height=
"wrap_content"
android:layout_below=
"@id/img_red"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"1
2
dp"
android:layout_marginTop=
"1
0
dp"
android:text=
"@string/dot"
android:textSize=
"14sp"
/>
...
...
@@ -128,8 +128,8 @@
android:id=
"@+id/tv_bonus_hint"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2dp"
android:layout_alignParentRight=
"true"
android:layout_marginTop=
"2dp"
android:textSize=
"12sp"
/>
</RelativeLayout>
...
...
@@ -230,14 +230,13 @@
<Button
android:id=
"@+id/btn_get_bonus"
android:layout_width=
"60dp"
android:layout_height=
"
30
dp"
android:layout_height=
"
26
dp"
android:layout_alignParentEnd=
"true"
android:layout_centerVertical=
"true"
android:layout_marginStart=
"20dp"
android:layout_marginEnd=
"5dp"
android:background=
"@drawable/btn_friends_selectored"
android:text=
"结算中"
android:enabled=
"false"
android:textColor=
"@drawable/btn_friends_text_color_selectored"
android:textSize=
"12sp"
/>
...
...
GoodMoney/app/src/main/res/layout/view_sign.xml
View file @
e5052e39
...
...
@@ -29,6 +29,7 @@
android:id=
"@+id/tv_sign_first"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_marginTop=
"5dp"
android:gravity=
"center"
android:textColor=
"@color/white"
android:textSize=
"@dimen/font_size_14"
/>
...
...
@@ -56,6 +57,7 @@
android:id=
"@+id/tv_sign_two"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_marginTop=
"5dp"
android:gravity=
"center"
android:textColor=
"@color/white"
android:textSize=
"@dimen/font_size_14"
/>
...
...
@@ -83,6 +85,7 @@
android:id=
"@+id/tv_sign_three"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_marginTop=
"5dp"
android:gravity=
"center"
android:textColor=
"@color/white"
android:textSize=
"@dimen/font_size_14"
/>
...
...
@@ -110,6 +113,7 @@
android:id=
"@+id/tv_sign_four"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_marginTop=
"5dp"
android:gravity=
"center"
android:textColor=
"@color/white"
android:textSize=
"@dimen/font_size_14"
/>
...
...
@@ -137,6 +141,7 @@
android:id=
"@+id/tv_sign_five"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_marginTop=
"5dp"
android:gravity=
"center"
android:textColor=
"@color/white"
android:textSize=
"@dimen/font_size_14"
/>
...
...
@@ -164,6 +169,7 @@
android:id=
"@+id/tv_sign_six"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_marginTop=
"5dp"
android:gravity=
"center"
android:textColor=
"@color/white"
android:textSize=
"@dimen/font_size_14"
/>
...
...
@@ -191,6 +197,7 @@
android:id=
"@+id/tv_sign_seven"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_marginTop=
"5dp"
android:gravity=
"center"
android:text=
"78"
android:textColor=
"@color/white"
...
...
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