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
3164499e
Commit
3164499e
authored
Nov 25, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
52415afc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
39 deletions
+98
-39
DrawcashActivity.kt
...java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
+6
-0
MorningClockActivity.kt
.../com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
+19
-0
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+7
-0
PanFragment.kt
.../main/java/com/mints/goodmoney/ui/fragment/PanFragment.kt
+3
-19
activity_drawcash.xml
GoodMoney/app/src/main/res/layout/activity_drawcash.xml
+29
-9
fragment_main_pan.xml
GoodMoney/app/src/main/res/layout/fragment_main_pan.xml
+1
-1
item_fragment_main_my_title.xml
...y/app/src/main/res/layout/item_fragment_main_my_title.xml
+33
-10
ic_goldtry_about.png
GoodMoney/app/src/main/res/mipmap-xhdpi/ic_goldtry_about.png
+0
-0
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
View file @
3164499e
...
...
@@ -23,8 +23,10 @@ import com.mints.library.utils.CommonUtils
import
com.mints.library.utils.json.JsonUtil
import
kotlinx.android.synthetic.main.activity_drawcash.*
import
kotlinx.android.synthetic.main.header_layout.*
import
kotlinx.android.synthetic.main.item_fragment_main_my_title.*
import
kotlinx.android.synthetic.main.view_title.*
import
net.grandcentrix.tray.AppPreferences
import
java.math.BigDecimal
import
java.util.*
/**
...
...
@@ -160,6 +162,10 @@ class DrawcashActivity : BaseActivity(),
priceList
=
data
.
cashOutMoneyArr
initRvView
()
}
val
allcoinBig
=
BigDecimal
(
data
.
coin
.
toString
())
val
rateBig
=
BigDecimal
(
"10000"
)
val
cashStr
:
String
=
allcoinBig
.
divide
(
rateBig
).
setScale
(
2
,
BigDecimal
.
ROUND_DOWN
).
toString
()
tvDrawcashGoldabout
.
setText
(
"约"
+
cashStr
+
"元"
)
}
override
fun
editUserMsgSuc
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
View file @
3164499e
package
com.mints.goodmoney.ui.activitys
import
android.os.Bundle
import
android.view.View
import
androidx.recyclerview.widget.GridLayoutManager
import
com.mints.goodmoney.R
...
...
@@ -32,6 +33,7 @@ class MorningClockActivity : BaseActivity()
private
lateinit
var
vedioAdingManager
:
VedioAdingManager
private
var
loadVedioFailCount
=
0
private
var
morningClockBean
:
MorningClockBean
?
=
null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_morning_clock
...
...
@@ -67,6 +69,7 @@ class MorningClockActivity : BaseActivity()
}
override
fun
getUpEarlySignMsgSuc
(
data
:
MorningClockBean
)
{
morningClockBean
=
data
morningClockList
=
data
.
targetList
if
(
data
.
isCanClick
)
{
...
...
@@ -152,6 +155,22 @@ class MorningClockActivity : BaseActivity()
}
private
fun
vedioAdingSuccess
(
adType
:
String
)
{
try
{
if
(
morningClockList
!=
null
&&
morningClockList
!!
.
size
>
0
)
{
for
(
morningBean
in
morningClockList
!!
)
{
if
(
morningBean
.
needDays
==
morningClockBean
?.
continuityDays
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
morningBean
.
coin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_MORNING_CLOCK
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
break
}
}
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
morningClockPresenter
.
getUpEarlyClickButton
(
adType
)
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
3164499e
...
...
@@ -47,6 +47,7 @@ import kotlinx.android.synthetic.main.item_fragment_main_my_clock.*
import
kotlinx.android.synthetic.main.item_fragment_main_my_promotions.*
import
kotlinx.android.synthetic.main.item_fragment_main_my_title.*
import
kotlinx.android.synthetic.main.view_title.*
import
java.math.BigDecimal
import
java.util.*
/**
...
...
@@ -390,6 +391,11 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
// 金币
item_title_gold_count
.
text
=
userGold
val
allcoinBig
=
BigDecimal
(
userConfig
!!
.
userMsg
.
coin
.
toString
())
val
rateBig
=
BigDecimal
(
"10000"
)
val
cashStr
:
String
=
allcoinBig
.
divide
(
rateBig
).
setScale
(
2
,
BigDecimal
.
ROUND_DOWN
).
toString
()
item_title_gold_about
.
setText
(
"约"
+
cashStr
+
"元"
)
}
/**
...
...
@@ -674,6 +680,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
private
fun
vedioAdingSuccess
(
adType
:
String
)
{
val
bundle
=
Bundle
()
if
(
TextUtils
.
equals
(
carrierType
,
Constant
.
CARRIER_SIGNIN_HOMEPAGE_CARD
))
{
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
curSignCoin
*
2
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_SIGNIN_HOMEPAGE_CARD
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
return
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/PanFragment.kt
View file @
3164499e
...
...
@@ -17,7 +17,6 @@ import com.mints.goodmoney.mvp.presenters.PanPresenter
import
com.mints.goodmoney.mvp.views.PanView
import
com.mints.goodmoney.ui.activitys.AwardActivity
import
com.mints.goodmoney.ui.fragment.base.BaseFragment
import
com.mints.library.net.netstatus.NetUtils
import
com.mints.library.utils.json.JsonUtil
import
kotlinx.android.synthetic.main.fragment_main_pan.*
...
...
@@ -56,9 +55,7 @@ class PanFragment : BaseFragment(), PanView {
// 游客登录
panPresenter
.
userLogin
()
}
else
{
if
(!
isLoadPanSuc
&&
NetUtils
.
isNetworkConnected
(
getContext
()))
{
loadTurnUrl
()
}
loadTurnUrl
()
}
}
}
...
...
@@ -69,9 +66,7 @@ class PanFragment : BaseFragment(), PanView {
}
override
fun
loginSuc
()
{
if
(!
isLoadPanSuc
&&
NetUtils
.
isNetworkConnected
(
getContext
()))
{
loadTurnUrl
()
}
loadTurnUrl
()
}
/**
...
...
@@ -80,7 +75,7 @@ class PanFragment : BaseFragment(), PanView {
private
fun
loadTurnUrl
()
{
getTurnUrl
()
blTurntableWebview
.
setOnTouchListener
(
object
:
View
.
OnTouchListener
{
override
fun
onTouch
(
v
:
View
?,
event
:
MotionEvent
):
Boolean
{
override
fun
onTouch
(
v
:
View
?,
event
:
MotionEvent
):
Boolean
{
return
event
.
action
==
MotionEvent
.
ACTION_MOVE
}
})
...
...
@@ -114,8 +109,6 @@ class PanFragment : BaseFragment(), PanView {
val
tokenID
=
userManager
.
tokenID
val
url
:
String
=
BuildConfig
.
MainIp
+
"turn/turn.html?carrierType="
+
carrierType
+
"&token="
+
tokenID
blTurntableWebview
.
loadUrl
(
url
)
isLoadPanSuc
=
true
}
/**
...
...
@@ -127,13 +120,4 @@ class PanFragment : BaseFragment(), PanView {
}
}
/**
* 用户主动取消js调用
*/
private
fun
androidCallJsCancel
()
{
// 调用js中的方法(必须和js中的handlerName想同)
blTurntableWebview
.
callHandler
(
"cancelTurnTable"
,
""
)
{}
}
}
\ No newline at end of file
GoodMoney/app/src/main/res/layout/activity_drawcash.xml
View file @
3164499e
...
...
@@ -35,16 +35,36 @@
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tvDrawcashGold"
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:gravity=
"center_vertical"
android:text=
"0"
android:textColor=
"@color/main_mints"
android:textSize=
"22sp"
android:textStyle=
"bold"
/>
android:layout_height=
"60dp"
android:layout_alignParentRight=
"true"
>
<TextView
android:id=
"@+id/tvDrawcashGold"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"0"
android:textColor=
"@color/main_mints"
android:textSize=
"22sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tvDrawcashGoldabout"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"-10dp"
android:layout_toRightOf=
"@+id/tvDrawcashGold"
android:background=
"@mipmap/ic_goldtry_about"
android:gravity=
"center"
android:paddingLeft=
"1dp"
android:paddingRight=
"1dp"
android:text=
"约0.00元"
android:textColor=
"@color/white"
android:textSize=
"10sp"
/>
</RelativeLayout>
</RelativeLayout>
...
...
GoodMoney/app/src/main/res/layout/fragment_main_pan.xml
View file @
3164499e
...
...
@@ -9,6 +9,6 @@
<com.github.lzyzsd.jsbridge.BridgeWebView
android:id=
"@+id/blTurntableWebview"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
/>
</RelativeLayout>
GoodMoney/app/src/main/res/layout/item_fragment_main_my_title.xml
View file @
3164499e
...
...
@@ -78,22 +78,45 @@
android:elevation=
"1dip"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingStart=
"
10
dp"
android:paddingEnd=
"
10
dp"
>
android:paddingStart=
"
6
dp"
android:paddingEnd=
"
6
dp"
>
<ImageView
android:layout_width=
"32dp"
android:layout_height=
"32dp"
android:src=
"@mipmap/ic_gold"
/>
<TextView
android:id=
"@+id/item_title_gold_count"
<RelativeLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"10dp"
android:layout_weight=
"1"
android:textColor=
"@color/my_color_orange"
android:textSize=
"26sp"
/>
android:layout_height=
"70dp"
android:layout_weight=
"1"
>
<TextView
android:id=
"@+id/item_title_gold_count"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginStart=
"6dp"
android:text=
"0"
android:textColor=
"@color/my_color_orange"
android:textSize=
"26sp"
/>
<TextView
android:id=
"@+id/item_title_gold_about"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"-14dp"
android:layout_toRightOf=
"@+id/item_title_gold_count"
android:background=
"@mipmap/ic_goldtry_about"
android:gravity=
"center"
android:paddingLeft=
"1dp"
android:paddingRight=
"1dp"
android:text=
"约0.00元"
android:textColor=
"@color/white"
android:textSize=
"10sp"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"wrap_content"
...
...
@@ -113,7 +136,7 @@
android:id=
"@+id/btn_withdraw"
android:layout_width=
"60dp"
android:layout_height=
"30dp"
android:layout_marginStart=
"
10
dp"
android:layout_marginStart=
"
4
dp"
android:background=
"@drawable/shape_btn_switch"
android:text=
"提现"
android:textColor=
"@color/white"
...
...
GoodMoney/app/src/main/res/mipmap-xhdpi/ic_goldtry_about.png
0 → 100644
View file @
3164499e
4.74 KB
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