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
a24c1beb
Commit
a24c1beb
authored
Dec 02, 2020
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
f48885ec
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
103 additions
and
113 deletions
+103
-113
build.gradle
GoodMoney/app/build.gradle
+2
-3
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+13
-12
MintsApplication.java
...p/src/main/java/com/mints/goodmoney/MintsApplication.java
+9
-6
YwhzManager.kt
.../src/main/java/com/mints/goodmoney/manager/YwhzManager.kt
+4
-2
DrawcashPresenter.java
...com/mints/goodmoney/mvp/presenters/DrawcashPresenter.java
+4
-2
HomePresenter.kt
.../java/com/mints/goodmoney/mvp/presenters/HomePresenter.kt
+4
-1
LoginPresenter.kt
...java/com/mints/goodmoney/mvp/presenters/LoginPresenter.kt
+4
-1
MyPresenter.kt
...in/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
+4
-1
PanPresenter.kt
...n/java/com/mints/goodmoney/mvp/presenters/PanPresenter.kt
+3
-1
FoodSubsidyActivity.kt
...a/com/mints/goodmoney/ui/activitys/FoodSubsidyActivity.kt
+0
-15
MorningClockActivity.kt
.../com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
+0
-10
WalkActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/WalkActivity.kt
+0
-9
WaterActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/WaterActivity.kt
+0
-1
FriendsFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
+11
-4
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+9
-2
ZhangyueFragment.kt
.../java/com/mints/goodmoney/ui/fragment/ZhangyueFragment.kt
+7
-9
BonusDialog.kt
...c/main/java/com/mints/goodmoney/ui/widgets/BonusDialog.kt
+6
-4
ShareDialog.kt
...c/main/java/com/mints/goodmoney/ui/widgets/ShareDialog.kt
+10
-12
BubbleUtils.java
...a/com/mints/goodmoney/ui/widgets/seekbar/BubbleUtils.java
+3
-3
activity_splash_ylh.xml
GoodMoney/app/src/main/res/layout/activity_splash_ylh.xml
+1
-1
fragment_main_money.xml
GoodMoney/app/src/main/res/layout/fragment_main_money.xml
+2
-3
fragment_main_zy.xml
GoodMoney/app/src/main/res/layout/fragment_main_zy.xml
+4
-5
themes.xml
GoodMoney/app/src/main/res/values/themes.xml
+3
-6
No files found.
GoodMoney/app/build.gradle
View file @
a24c1beb
...
...
@@ -24,7 +24,6 @@ android {
//配置so文件
ndk
{
abiFilters
"armeabi"
,
"armeabi-v7a"
,
"x86"
,
"mips"
// abiFilters "armeabi", "armeabi-v7a"
}
manifestPlaceholders
=
[
CHANNEL_NAME_VALUE:
"goodmoney"
,
...
...
@@ -132,7 +131,7 @@ android {
dependencies
{
implementation
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
implementation
'androidx.appcompat:appcompat:1.
0
.0'
implementation
'androidx.appcompat:appcompat:1.
2
.0'
implementation
'androidx.constraintlayout:constraintlayout:1.1.3'
implementation
'androidx.recyclerview:recyclerview:1.0.0'
implementation
'com.google.android.material:material:1.0.0'
...
...
@@ -146,7 +145,7 @@ dependencies {
implementation
'com.readystatesoftware.systembartint:systembartint:1.0.3'
implementation
'com.gyf.immersionbar:immersionbar:2.3.3-beta15'
// okhttp3日志
implementation
'com.squareup.okhttp3:logging-interceptor:4.
0
.0'
implementation
'com.squareup.okhttp3:logging-interceptor:4.
1
.0'
implementation
'com.squareup.okhttp3:okhttp:4.1.0'
implementation
'com.orhanobut:logger:2.2.0'
// 权限
...
...
GoodMoney/app/src/main/AndroidManifest.xml
View file @
a24c1beb
...
...
@@ -37,6 +37,7 @@
android:allowBackup=
"true"
android:icon=
"@mipmap/ic_launcher"
android:label=
"@string/app_name"
android:largeHeap=
"true"
android:networkSecurityConfig=
"@xml/network_security_config"
android:requestLegacyExternalStorage=
"true"
android:supportsRtl=
"true"
...
...
@@ -87,23 +88,23 @@
android:name=
"JPUSH_CHANNEL"
android:value=
"${JPUSH_CHANNEL}"
/>
<!-- <activity-->
<!-- android:configChanges="keyboard|orientation|screenSize"-->
<!-- android:windowSoftInputMode="adjustPan|stateHidden"-->
<!-- android:theme="@style/Theme.ActivitySplash"-->
<!-- android:name=".ui.activitys.SplashYlhActivity"-->
<!-- android:screenOrientation="portrait">-->
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!--
<activity-->
<!--
android:configChanges="keyboard|orientation|screenSize"-->
<!--
android:windowSoftInputMode="adjustPan|stateHidden"-->
<!--
android:theme="@style/Theme.ActivitySplash"-->
<!--
android:name=".ui.activitys.SplashYlhActivity"-->
<!--
android:screenOrientation="portrait">-->
<!--
<intent-filter>-->
<!--
<action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
<!-- </activity>-->
<!--
<category android:name="android.intent.category.LAUNCHER" />-->
<!--
</intent-filter>-->
<!--
</activity>-->
<activity
android:name=
".ui.activitys.SplashYlhActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/
Theme.NoDisplay
"
>
android:theme=
"@style/
NormalSplash
"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/MintsApplication.java
View file @
a24c1beb
...
...
@@ -34,7 +34,7 @@ import rx.schedulers.Schedulers;
*/
public
class
MintsApplication
extends
MultiDexApplication
{
private
static
Context
mContext
;
private
static
MintsApplication
mContext
;
public
static
String
OAID
=
""
;
private
static
LocalBroadcastManager
mLocalBroadcatManager
;
...
...
@@ -42,14 +42,15 @@ public class MintsApplication extends MultiDexApplication {
private
LoanService
loanService
;
public
static
Context
getContext
()
{
public
static
MintsApplication
getContext
()
{
return
mContext
;
}
@Override
public
void
onCreate
()
{
super
.
onCreate
();
mContext
=
this
.
getApplicationContext
();
mContext
=
this
;
// 判断应用是否在前台
ForegroundOrBackground
.
init
(
this
);
// 9.0之后不可多进程使用一个目录下的WebView,写在SDK初始化之前
...
...
@@ -175,9 +176,11 @@ public class MintsApplication extends MultiDexApplication {
private
String
getProcessName
(
Context
context
)
{
if
(
context
==
null
)
return
null
;
ActivityManager
manager
=
(
ActivityManager
)
context
.
getSystemService
(
Context
.
ACTIVITY_SERVICE
);
for
(
ActivityManager
.
RunningAppProcessInfo
processInfo
:
manager
.
getRunningAppProcesses
())
{
if
(
processInfo
.
pid
==
android
.
os
.
Process
.
myPid
())
{
return
processInfo
.
processName
;
if
(
manager
!=
null
)
{
for
(
ActivityManager
.
RunningAppProcessInfo
processInfo
:
manager
.
getRunningAppProcesses
())
{
if
(
processInfo
.
pid
==
android
.
os
.
Process
.
myPid
())
{
return
processInfo
.
processName
;
}
}
}
return
null
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/YwhzManager.kt
View file @
a24c1beb
...
...
@@ -20,7 +20,7 @@ object YwhzManager {
private
const
val
APPID_RELEASE
=
"1726"
private
const
val
APPSECRET_RELEASE
=
"g4fuod79v6e7cw4liw91iwfm5qryvz1u"
fun
init
(
application
:
Application
){
fun
init
(
application
:
Application
)
{
val
userManager
=
UserManager
.
getInstance
()
var
userID
=
userManager
.
userID
if
(!
userManager
.
userIsLogin
()
||
TextUtils
.
isEmpty
(
userID
))
{
...
...
@@ -39,7 +39,9 @@ object YwhzManager {
}
var
oaid
:
String
=
""
if
(
Build
.
VERSION
.
SDK_INT
>
28
)
{
oaid
=
MintsApplication
.
OAID
if
(!
TextUtils
.
isEmpty
(
MintsApplication
.
OAID
))
{
oaid
=
MintsApplication
.
OAID
}
}
setDebugMode
()
init
(
application
,
appSecret
,
appid
,
userID
,
"1"
,
oaid
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/DrawcashPresenter.java
View file @
a24c1beb
...
...
@@ -113,7 +113,7 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
/**
* 提交设备信息
*/
public
void
saveTerminalInfo
(
double
curCash
)
{
public
void
saveTerminalInfo
(
double
curCash
)
{
view
.
showLoading
(
"加载中..."
);
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
...
...
@@ -133,7 +133,9 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
vo
.
put
(
"uuid"
,
new
DeviceUuidFactory
().
getDeviceUuid
());
vo
.
put
(
"osversion"
,
deviceInfo
.
getOSVersion
());
vo
.
put
(
"appversion"
,
deviceInfo
.
getVersionName
());
vo
.
put
(
"oaid"
,
MintsApplication
.
OAID
);
if
(!
TextUtils
.
isEmpty
(
MintsApplication
.
OAID
))
{
vo
.
put
(
"oaid"
,
MintsApplication
.
OAID
);
}
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
saveTerminalInfo
(
vo
),
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/HomePresenter.kt
View file @
a24c1beb
package
com.mints.goodmoney.mvp.presenters
import
android.text.TextUtils
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.DeviceInfo
...
...
@@ -160,7 +161,9 @@ class HomePresenter : BasePresenter<HomeView>() {
vo
[
"mac1"
]
=
macAddress
vo
[
"androidid"
]
=
deviceInfo
.
getAndroidId
(
null
)
vo
[
"imei"
]
=
deviceInfo
.
iMEI
vo
[
"oaid"
]
=
MintsApplication
.
OAID
if
(!
TextUtils
.
isEmpty
(
MintsApplication
.
OAID
))
{
vo
[
"oaid"
]
=
MintsApplication
.
OAID
}
vo
[
"os"
]
=
"android"
vo
[
"model"
]
=
deviceInfo
.
brand
+
" "
+
deviceInfo
.
mobileModel
vo
[
"uuid"
]
=
DeviceUuidFactory
().
deviceUuid
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/LoginPresenter.kt
View file @
a24c1beb
package
com.mints.goodmoney.mvp.presenters
import
android.text.TextUtils
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.DeviceInfo
...
...
@@ -192,7 +193,9 @@ class LoginPresenter : BasePresenter<LoginView>() {
vo
[
"mac1"
]
=
macAddress
vo
[
"androidid"
]
=
deviceInfo
.
getAndroidId
(
null
)
vo
[
"imei"
]
=
deviceInfo
.
iMEI
vo
[
"oaid"
]
=
MintsApplication
.
OAID
if
(!
TextUtils
.
isEmpty
(
MintsApplication
.
OAID
))
{
vo
[
"oaid"
]
=
MintsApplication
.
OAID
}
vo
[
"os"
]
=
"android"
vo
[
"model"
]
=
deviceInfo
.
brand
+
" "
+
deviceInfo
.
mobileModel
vo
[
"uuid"
]
=
DeviceUuidFactory
().
deviceUuid
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
View file @
a24c1beb
package
com.mints.goodmoney.mvp.presenters
import
android.text.TextUtils
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.DeviceInfo
...
...
@@ -187,7 +188,9 @@ class MyPresenter : BasePresenter<MyView>() {
vo
[
"mac1"
]
=
macAddress
vo
[
"androidid"
]
=
deviceInfo
.
getAndroidId
(
null
)
vo
[
"imei"
]
=
deviceInfo
.
iMEI
vo
[
"oaid"
]
=
MintsApplication
.
OAID
if
(!
TextUtils
.
isEmpty
(
MintsApplication
.
OAID
))
{
vo
[
"oaid"
]
=
MintsApplication
.
OAID
}
vo
[
"os"
]
=
"android"
vo
[
"model"
]
=
deviceInfo
.
brand
+
" "
+
deviceInfo
.
mobileModel
vo
[
"uuid"
]
=
DeviceUuidFactory
().
deviceUuid
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/PanPresenter.kt
View file @
a24c1beb
...
...
@@ -65,7 +65,9 @@ class PanPresenter : BasePresenter<PanView>() {
vo
[
"mac1"
]
=
macAddress
vo
[
"androidid"
]
=
deviceInfo
.
getAndroidId
(
null
)
vo
[
"imei"
]
=
deviceInfo
.
iMEI
vo
[
"oaid"
]
=
MintsApplication
.
OAID
if
(!
TextUtils
.
isEmpty
(
MintsApplication
.
OAID
))
{
vo
[
"oaid"
]
=
MintsApplication
.
OAID
}
vo
[
"os"
]
=
"android"
vo
[
"model"
]
=
deviceInfo
.
brand
+
" "
+
deviceInfo
.
mobileModel
vo
[
"uuid"
]
=
DeviceUuidFactory
().
deviceUuid
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/FoodSubsidyActivity.kt
View file @
a24c1beb
...
...
@@ -4,7 +4,6 @@ import android.os.Bundle
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.TTNativeExpressManager
import
com.mints.goodmoney.manager.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.manager.TtCsjAdManager
import
com.mints.goodmoney.mvp.model.MealBean
...
...
@@ -24,7 +23,6 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
private
val
foodSubsidyPresenter
by
lazy
{
FoodSubsidyPresenter
()
}
private
val
ttNativeExpressManager
by
lazy
{
TTNativeExpressManager
()
}
private
var
curCoin
=
0
//点击的汽泡金币
private
var
buttonCoin
=
0
//点击的汽泡金币
...
...
@@ -40,11 +38,6 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
initListener
()
}
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
ttNativeExpressManager
.
initTTAd
(
false
)
}
override
fun
onResume
()
{
super
.
onResume
()
...
...
@@ -57,7 +50,6 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
svWalk
?.
destoryAnim
()
flSubsidykAd
?.
removeAllViews
()
ttNativeExpressManager
.
onTTAdDestroy
()
foodSubsidyPresenter
.
detachView
()
}
...
...
@@ -104,13 +96,6 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
* 初始化信息iyc
*/
private
fun
initExpress
()
{
// try {
// ttNativeExpressManager.initTTAd(false)
// ttNativeExpressManager.getNativeExpressInit(TtCsjAdManager.TT_AD_NATIVEEXPRESS_EAT, flSubsidykAd, 320f, 0f)
// } catch (e: Exception) {
// e.printStackTrace()
// }
try
{
if
(
TTPreLoadCarrierExpressManager
.
getInstance
().
ttFrameLayout
!=
null
)
{
if
(
flSubsidykAd
!=
null
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
View file @
a24c1beb
...
...
@@ -6,7 +6,6 @@ import androidx.recyclerview.widget.GridLayoutManager
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.video.VedioAdingManager
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.TTNativeExpressManager
import
com.mints.goodmoney.manager.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.manager.TtCsjAdManager
import
com.mints.goodmoney.mvp.model.MorningClockBean
...
...
@@ -27,7 +26,6 @@ class MorningClockActivity : BaseActivity()
,
View
.
OnClickListener
,
MorningClockView
{
private
val
morningClockPresenter
by
lazy
{
MorningClockPresenter
()
}
private
val
ttNativeExpressManager
by
lazy
{
TTNativeExpressManager
()
}
private
lateinit
var
morningClockAdapter
:
MorningClockAdapter
private
var
morningClockList
:
MutableList
<
MorningClockBean
.
MorningClockTargetBean
>?
=
null
...
...
@@ -55,7 +53,6 @@ class MorningClockActivity : BaseActivity()
override
fun
onDestroy
()
{
super
.
onDestroy
()
flMorningClockAd
?.
removeAllViews
()
ttNativeExpressManager
.
onTTAdDestroy
()
morningClockPresenter
.
detachView
()
}
...
...
@@ -180,13 +177,6 @@ class MorningClockActivity : BaseActivity()
* 初始化信息iyc
*/
private
fun
initExpress
()
{
// try {
// ttNativeExpressManager.initTTAd(false)
// ttNativeExpressManager.getNativeExpressInit(TtCsjAdManager.TT_AD_NATIVEEXPRESS_MORNINGCLOCK, flMorningClockAd, 320f, 0f)
// } catch (e: Exception) {
// e.printStackTrace()
// }
try
{
if
(
TTPreLoadCarrierExpressManager
.
getInstance
().
ttFrameLayout
!=
null
)
{
if
(
flMorningClockAd
!=
null
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WalkActivity.kt
View file @
a24c1beb
...
...
@@ -23,7 +23,6 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
private
val
walkPresenter
by
lazy
{
WalkPresenter
()
}
// private val ttNativeExpressManager by lazy { TTNativeExpressManager() }
private
var
curCoin
=
0
//点击的汽泡金币
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_walk
...
...
@@ -48,7 +47,6 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
svWalk
?.
destoryAnim
()
flWalkAd
?.
removeAllViews
()
// ttNativeExpressManager.onTTAdDestroy()
walkPresenter
.
detachView
()
}
...
...
@@ -109,13 +107,6 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
* 初始化信息iyc
*/
private
fun
initExpress
()
{
// try {
// ttNativeExpressManager.initTTAd(false)
// ttNativeExpressManager.getNativeExpressInit(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WALK, flWalkAd, 320f, 0f)
// } catch (e: Exception) {
// e.printStackTrace()
// }
try
{
if
(
TTPreLoadCarrierExpressManager
.
getInstance
().
ttFrameLayout
!=
null
)
{
if
(
flWalkAd
!=
null
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WaterActivity.kt
View file @
a24c1beb
...
...
@@ -52,7 +52,6 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
wvWater
?.
closeWaterViewTime
()
flWaterAd
?.
removeAllViews
()
// ttNativeExpressManager.onTTAdDestroy()
waterPresenter
.
detachView
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
View file @
a24c1beb
...
...
@@ -22,6 +22,7 @@ import com.mints.goodmoney.mvp.presenters.FriendsPresenter
import
com.mints.goodmoney.mvp.views.FriendsView
import
com.mints.goodmoney.ui.activitys.DrawcashActivity
import
com.mints.goodmoney.ui.activitys.FriendsActivity
import
com.mints.goodmoney.ui.activitys.LoginActivity
import
com.mints.goodmoney.ui.adapter.FriendsPagerAdapter
import
com.mints.goodmoney.ui.adapter.InvitedAdapter
import
com.mints.goodmoney.ui.fragment.base.BaseFragment
...
...
@@ -29,6 +30,7 @@ import com.mints.goodmoney.ui.widgets.BonusDialog
import
com.mints.goodmoney.ui.widgets.CustomDialogAsApple
import
com.mints.goodmoney.ui.widgets.DialogListener
import
com.mints.goodmoney.ui.widgets.ShareDialog
import
com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils
import
com.mints.goodmoney.utils.ImageUtil
import
com.mints.goodmoney.utils.SpanUtils
import
com.scwang.smartrefresh.layout.api.RefreshLayout
...
...
@@ -269,7 +271,7 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
tv_bonus_sum
.
text
=
SpanUtils
()
.
append
(
"今日奖池 "
).
setForegroundColor
(
resources
.
getColor
(
R
.
color
.
black
))
.
append
(
data
.
titleMsg
).
setFontSize
(
60
).
setForegroundColor
(
resources
.
getColor
(
R
.
color
.
color_E72C2B
))
.
append
(
data
.
titleMsg
).
setFontSize
(
BubbleUtils
.
dp2px
(
28
)
).
setForegroundColor
(
resources
.
getColor
(
R
.
color
.
color_E72C2B
))
.
append
(
" 元"
).
setForegroundColor
(
resources
.
getColor
(
R
.
color
.
black
))
.
create
()
...
...
@@ -283,7 +285,7 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
tv_bonus_money
.
text
=
SpanUtils
()
.
append
(
data
.
cash
.
toString
()).
setForegroundColor
(
resources
.
getColor
(
R
.
color
.
color_E72C2B
))
.
append
(
"元"
).
setFontSize
(
22
).
setForegroundColor
(
resources
.
getColor
(
R
.
color
.
color_E72C2B
))
.
append
(
"元"
).
setFontSize
(
BubbleUtils
.
dp2px
(
14
)
).
setForegroundColor
(
resources
.
getColor
(
R
.
color
.
color_E72C2B
))
.
create
()
tv_bonus_rate
.
text
=
SpanUtils
()
...
...
@@ -361,8 +363,13 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
}
R
.
id
.
btn_invite
->
{
// 邀请好友
// shareImgDialog()
if
(!
UserManager
.
getInstance
().
userIsLogin
())
{
readyGo
(
LoginActivity
::
class
.
java
)
return
}
if
(!
ps
.
getBoolean
(
Constant
.
FIRST_SHARE_INVITED
,
false
))
{
// 第一次邀请提示弹框
firstWeChatInvite
()
...
...
@@ -503,7 +510,7 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
}
})
cdaa
!!
.
setTitle
(
"提示"
)
cdaa
!!
.
setContent
(
"
分享用户需
登录才能获得贡献值"
)
cdaa
!!
.
setContent
(
"
被邀请人需要
登录才能获得贡献值"
)
cdaa
!!
.
setLeft
(
"取消"
)
cdaa
!!
.
setRight
(
"打开微信"
)
cdaa
!!
.
show
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
a24c1beb
...
...
@@ -439,6 +439,10 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
if
(
taskBean
.
otherConfig
!=
null
)
{
when
(
taskBean
.
otherConfig
.
status
)
{
0
->
{
if
(!
userManager
.
userIsLogin
())
{
readyGo
(
LoginActivity
::
class
.
java
)
}
if
(!
ps
.
getBoolean
(
Constant
.
FIRST_SHARE_MY
,
false
))
{
// 第一次邀请提示弹框
firstWeChatInvite
()
...
...
@@ -467,6 +471,10 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
2
->
{
if
(!
userManager
.
userIsLogin
())
{
readyGo
(
LoginActivity
::
class
.
java
)
}
if
(!
ps
.
getBoolean
(
Constant
.
FIRST_SHARE_MY
,
false
))
{
// 第一次邀请提示弹框
firstWeChatInvite
()
...
...
@@ -559,7 +567,6 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
R
.
id
.
iv_right_icon2
->
{
// 跳转QQ客服
// jumpQQ()
jumpQQGroup
()
}
R
.
id
.
item_customer_service
->
{
...
...
@@ -823,7 +830,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
})
cdaa
!!
.
setTitle
(
"提示"
)
cdaa
!!
.
setContent
(
"
分享用户需
登录才能获得贡献值"
)
cdaa
!!
.
setContent
(
"
被邀请人需要
登录才能获得贡献值"
)
cdaa
!!
.
setLeft
(
"取消"
)
cdaa
!!
.
setRight
(
"打开微信"
)
cdaa
!!
.
show
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/ZhangyueFragment.kt
View file @
a24c1beb
...
...
@@ -46,7 +46,7 @@ class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChan
override
fun
onFragmentResume
()
{
super
.
onFragmentResume
()
if
(
AppConfig
.
fragmentClickFlag
==
=
Constant
.
FRAGMENT_CLICK_MAIN
)
{
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_MAIN
)
{
bookPresenter
.
getReadInfo
()
}
}
...
...
@@ -55,7 +55,6 @@ class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChan
super
.
onDestroy
()
IreaderApi
.
setReadChangeListener
(
null
)
bookPresenter
.
detachView
()
}
...
...
@@ -89,14 +88,13 @@ class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChan
//阅读{10}分钟,奖励{xx}金币,已读{x}分钟
tvZhangContent
.
visibility
=
View
.
VISIBLE
if
(
readTime
>=
sumTime
)
{
tvZhangContent
.
setText
(
"今日阅读任务已完成"
)
tvZhangContent
.
text
=
"今日阅读任务已完成"
}
else
{
tvZhangContent
.
setText
(
SpanUtils
()
.
append
(
"阅读"
).
append
(
"${sumTime / 60}"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
main_mints
)).
append
(
"分钟, "
)
.
append
(
"奖励"
).
append
(
"${sumCoin}"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
red
)).
append
(
"金币, "
)
.
append
(
"已读"
).
append
(
"${readTime / 60}"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
main_mints
)).
append
(
"分钟"
)
.
create
())
tvZhangContent
.
text
=
SpanUtils
()
.
append
(
"阅读"
).
append
(
"${sumTime / 60}"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
main_mints
)).
append
(
"分钟, "
)
.
append
(
"奖励"
).
append
(
"${sumCoin}"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
red
)).
append
(
"金币, "
)
.
append
(
"已读"
).
append
(
"${readTime / 60}"
).
setForegroundColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
main_mints
)).
append
(
"分钟"
)
.
create
()
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/BonusDialog.kt
View file @
a24c1beb
...
...
@@ -2,6 +2,7 @@ package com.mints.goodmoney.ui.widgets
import
android.app.Dialog
import
android.content.Context
import
android.graphics.Color
import
android.view.Gravity
import
android.view.KeyEvent
import
android.view.View
...
...
@@ -40,13 +41,14 @@ class BonusDialog(context: Context, private val listener: DialogListener) :
lp
.
gravity
=
Gravity
.
CENTER
lp
.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
lp
.
windowAnimations
=
R
.
style
.
DialogAnimBottom
// lp.dimAmount = 0; // 去背景遮盖
// lp.alpha = 1.0f;//透明效果
window
!!
.
attributes
=
lp
// 设置外部不可关闭
setCancelable
(
true
)
setCanceledOnTouchOutside
(
true
)
setCancelable
(
false
)
setCanceledOnTouchOutside
(
false
)
setOnKeyListener
{
_
,
i
,
_
->
i
==
KeyEvent
.
KEYCODE_BACK
}
// 查找View
tv_dialogper_title
=
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/ShareDialog.kt
View file @
a24c1beb
...
...
@@ -4,6 +4,7 @@ import android.app.Dialog
import
android.content.Context
import
android.graphics.Bitmap
import
android.view.Gravity
import
android.view.KeyEvent
import
android.view.View
import
android.view.WindowManager
import
android.widget.ImageView
...
...
@@ -22,7 +23,6 @@ import com.mints.goodmoney.utils.ImageUtil
import
com.mints.goodmoney.utils.QRCodeUtil
import
com.mints.goodmoney.utils.ToastUtil
class
ShareDialog
(
context
:
Context
)
:
Dialog
(
context
,
R
.
style
.
dialog
)
{
...
...
@@ -42,15 +42,14 @@ class ShareDialog(context: Context) :
lp
.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
lp
.
height
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
lp
.
windowAnimations
=
R
.
style
.
DialogAnimBottom
// lp.alpha = 1.0f;//透明效果
window
!!
.
attributes
=
lp
// 设置外部不可关闭
//
setCancelable(false)
//
setCanceledOnTouchOutside(false)
//
setOnKeyListener { _, i, _ ->
//
i == KeyEvent.KEYCODE_BACK
//
}
setCancelable
(
false
)
setCanceledOnTouchOutside
(
false
)
setOnKeyListener
{
_
,
i
,
_
->
i
==
KeyEvent
.
KEYCODE_BACK
}
// 查找View
llDialogShareWx
=
findViewById
<
View
>(
R
.
id
.
llDialogShareWx
)
as
LinearLayout
...
...
@@ -67,6 +66,10 @@ class ShareDialog(context: Context) :
shareWechat
()
}
tvDialogShareNext
.
setOnClickListener
{
dismiss
()
}
val
QRCode
=
QRCodeUtil
.
createQRCode
(
Constant
.
SHARE_URL
,
100
)
imgQrCode
.
setImageBitmap
(
QRCode
)
}
...
...
@@ -74,11 +77,6 @@ class ShareDialog(context: Context) :
private
fun
shareWechat
()
{
rlView
.
isDrawingCacheEnabled
=
true
rlView
.
drawingCacheQuality
=
View
.
DRAWING_CACHE_QUALITY_HIGH
//测量在屏幕上宽和高
// rlView.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
// View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED))
//确定View的大小和位置的,然后将其绘制出来
// rlView.layout(0, 0, rlView.measuredWidth, rlView.measuredHeight)
rlView
.
buildDrawingCache
()
val
bitmap
:
Bitmap
=
rlView
.
drawingCache
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/seekbar/BubbleUtils.java
View file @
a24c1beb
...
...
@@ -9,7 +9,7 @@ import java.io.FileInputStream;
import
java.io.IOException
;
import
java.util.Properties
;
class
BubbleUtils
{
public
class
BubbleUtils
{
private
static
final
File
BUILD_PROP_FILE
=
new
File
(
Environment
.
getRootDirectory
(),
"build.prop"
);
private
static
Properties
sBuildProperties
;
...
...
@@ -33,12 +33,12 @@ class BubbleUtils {
return
getBuildProperties
().
containsKey
(
"ro.miui.ui.version.name"
);
}
static
int
dp2px
(
int
dp
)
{
public
static
int
dp2px
(
int
dp
)
{
return
(
int
)
TypedValue
.
applyDimension
(
TypedValue
.
COMPLEX_UNIT_DIP
,
dp
,
Resources
.
getSystem
().
getDisplayMetrics
());
}
static
int
sp2px
(
int
sp
)
{
public
static
int
sp2px
(
int
sp
)
{
return
(
int
)
TypedValue
.
applyDimension
(
TypedValue
.
COMPLEX_UNIT_SP
,
sp
,
Resources
.
getSystem
().
getDisplayMetrics
());
}
...
...
GoodMoney/app/src/main/res/layout/activity_splash_ylh.xml
View file @
a24c1beb
...
...
@@ -26,11 +26,11 @@
<!-- 注意:如需要这个Logo区域,建议开发者使用自己的Logo资源,而不是联盟的Logo资源@drawable/gdt_splash_logo,资源规格可参照@drawable/gdt_splash_logo -->
<ImageView
android:id=
"@+id/app_logo"
android:layout_marginTop=
"10dp"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"10dp"
android:src=
"@drawable/splash_bg"
/>
<!-- 2.预设开屏图片区域: -->
...
...
GoodMoney/app/src/main/res/layout/fragment_main_money.xml
View file @
a24c1beb
...
...
@@ -3,21 +3,20 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<com.androidkun.xtablayout.XTabLayout
android:id=
"@+id/xtFragmentMoney"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"
30
dp"
android:layout_marginTop=
"
25
dp"
app:xTabIndicatorColor=
"#F28335"
app:xTabIndicatorHeight=
"4dp"
app:xTabIndicatorWidth=
"10dp"
app:xTabMode=
"scrollable"
app:xTabSelectedTextColor=
"@color/main_mints"
app:xTabSelectedTextSize=
"22sp"
app:xTabTextColor=
"#000"
app:xTabIndicatorWidth=
"10dp"
app:xTabTextSize=
"18sp"
/>
<com.mints.goodmoney.ui.widgets.MyViewPager
...
...
GoodMoney/app/src/main/res/layout/fragment_main_zy.xml
View file @
a24c1beb
...
...
@@ -3,26 +3,25 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<FrameLayout
android:id=
"@+id/fragment"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
></FrameLayout
>
android:layout_weight=
"1"
/
>
<TextView
android:id=
"@+id/tvZhangContent"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:background=
"@color/my_color_gray"
android:drawableLeft=
"@mipmap/ic_voice"
android:drawablePadding=
"5dp"
android:paddingLeft=
"14dp"
android:gravity=
"center_vertical"
android:paddingStart=
"14dp"
android:textSize=
"14sp"
android:visibility=
"gone"
></TextView>
android:visibility=
"gone"
app:drawableStartCompat=
"@mipmap/ic_voice"
/>
</LinearLayout>
GoodMoney/app/src/main/res/values/themes.xml
View file @
a24c1beb
...
...
@@ -33,12 +33,9 @@
<item
name=
"android:backgroundDimEnabled"
>
true
</item>
</style>
<style
name=
"Theme.NoDisplay"
parent=
"Theme.AppCompat.Light.NoActionBar"
>
<item
name=
"android:windowBackground"
>
@null
</item>
<style
name=
"NormalSplash"
parent=
"Theme.AppCompat.NoActionBar"
>
<item
name=
"android:windowBackground"
>
@drawable/splash_bg
</item>
<item
name=
"android:windowNoTitle"
>
true
</item>
<item
name=
"android:windowContentOverlay"
>
@null
</item>
<item
name=
"android:windowIsTranslucent"
>
false
</item>
<item
name=
"android:windowAnimationStyle"
>
@null
</item>
<item
name=
"android:windowDisablePreview"
>
true
</item>
<item
name=
"android:windowNoDisplay"
>
false
</item>
</style>
</resources>
\ No newline at end of file
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