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
0eec1ad6
Commit
0eec1ad6
authored
Dec 04, 2020
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分享弹框及账号合并页面
parent
f7e0f224
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
760 additions
and
275 deletions
+760
-275
build.gradle
GoodMoney/app/build.gradle
+1
-1
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+5
-0
AccountMergePresenter.kt
...m/mints/goodmoney/mvp/presenters/AccountMergePresenter.kt
+76
-0
PanPresenter.kt
...n/java/com/mints/goodmoney/mvp/presenters/PanPresenter.kt
+0
-3
AccountMergeView.kt
...in/java/com/mints/goodmoney/mvp/views/AccountMergeView.kt
+11
-0
LoanService.java
...pp/src/main/java/com/mints/goodmoney/net/LoanService.java
+16
-0
AccountMergeActivity.kt
.../com/mints/goodmoney/ui/activitys/AccountMergeActivity.kt
+74
-0
BindMobileActivity.kt
...va/com/mints/goodmoney/ui/activitys/BindMobileActivity.kt
+0
-4
CoinRecordActivity.kt
...va/com/mints/goodmoney/ui/activitys/CoinRecordActivity.kt
+0
-2
DrawcashActivity.kt
...java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
+0
-3
FeedbackActivity.kt
...java/com/mints/goodmoney/ui/activitys/FeedbackActivity.kt
+2
-2
SharePagerAdapter.kt
.../java/com/mints/goodmoney/ui/adapter/SharePagerAdapter.kt
+24
-0
FriendsFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
+16
-43
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+45
-49
CornerView.java
.../main/java/com/mints/goodmoney/ui/widgets/CornerView.java
+63
-0
ShareDialog.kt
...c/main/java/com/mints/goodmoney/ui/widgets/ShareDialog.kt
+97
-39
QQJumpUtil.kt
...app/src/main/java/com/mints/goodmoney/utils/QQJumpUtil.kt
+4
-10
QRCodeUtil.java
...p/src/main/java/com/mints/goodmoney/utils/QRCodeUtil.java
+10
-5
activity_aboutus.xml
GoodMoney/app/src/main/res/layout/activity_aboutus.xml
+2
-1
activity_account_merge.xml
GoodMoney/app/src/main/res/layout/activity_account_merge.xml
+159
-0
activity_drawcash.xml
GoodMoney/app/src/main/res/layout/activity_drawcash.xml
+31
-31
activity_feekback.xml
GoodMoney/app/src/main/res/layout/activity_feekback.xml
+12
-12
dialog_share.xml
GoodMoney/app/src/main/res/layout/dialog_share.xml
+8
-40
fragment_main_friends.xml
GoodMoney/app/src/main/res/layout/fragment_main_friends.xml
+12
-15
fragment_main_money.xml
GoodMoney/app/src/main/res/layout/fragment_main_money.xml
+3
-1
fragment_main_my.xml
GoodMoney/app/src/main/res/layout/fragment_main_my.xml
+4
-7
item_share_view.xml
GoodMoney/app/src/main/res/layout/item_share_view.xml
+71
-0
view_title.xml
GoodMoney/app/src/main/res/layout/view_title.xml
+14
-7
bg_share_1.png
GoodMoney/app/src/main/res/mipmap-xhdpi/bg_share_1.png
+0
-0
bg_share_2.png
GoodMoney/app/src/main/res/mipmap-xhdpi/bg_share_2.png
+0
-0
icon_exchange.png
GoodMoney/app/src/main/res/mipmap-xhdpi/icon_exchange.png
+0
-0
No files found.
GoodMoney/app/build.gradle
View file @
0eec1ad6
...
...
@@ -168,7 +168,7 @@ dependencies {
implementation
'com.daimajia.androidanimations:library:2.3@aar'
implementation
'com.romandanylyk:pageindicatorview:1.0.3'
// xtablayout
implementation
'com.androidkun:XTabLayout:1.1.
4
'
implementation
'com.androidkun:XTabLayout:1.1.
5
'
// zxing
implementation
'com.king.zxing:zxing-lite:1.1.7-androidx'
...
...
GoodMoney/app/src/main/AndroidManifest.xml
View file @
0eec1ad6
...
...
@@ -177,6 +177,11 @@
<activity
android:name=
".ui.activitys.FeedbackActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.AccountMergeActivity"
android:screenOrientation=
"portrait"
>
</activity>
<service
android:name=
".service.UpdateService"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/AccountMergePresenter.kt
0 → 100644
View file @
0eec1ad6
package
com.mints.goodmoney.mvp.presenters
import
com.google.gson.JsonObject
import
com.mints.goodmoney.manager.AppHttpManager
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.UserBean
import
com.mints.goodmoney.mvp.views.AccountMergeView
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
java.util.HashMap
class
AccountMergePresenter
:
BasePresenter
<
AccountMergeView
>()
{
/**
* 获取双账号用户信息
*/
fun
getKeepAccountMsg
(
keepOneAccountKey
:
String
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"keepOneAccountKey"
]
=
keepOneAccountKey
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getKeepAccountMsg
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
JsonObject
>>()
{
override
fun
onCompleted
()
{
}
override
fun
onError
(
e
:
Throwable
)
{
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
JsonObject
>)
{
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
view
.
getKeepAccountMsgSuc
()
}
else
->
{
view
.
showToast
(
message
)
view
.
getKeepAccountMsgFail
()
}
}
}
})
}
/**
* 保留双账号用户信息
*/
fun
toKeepAccount
(
keepOneAccountKey
:
String
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"keepOneAccountKey"
]
=
keepOneAccountKey
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
toKeepAccount
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
JsonObject
>>()
{
override
fun
onCompleted
()
{
}
override
fun
onError
(
e
:
Throwable
)
{
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
JsonObject
>)
{
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
view
.
toKeepAccountSuc
()
}
else
->
{
view
.
showToast
(
message
)
view
.
toKeepAccountFail
()
}
}
}
})
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/PanPresenter.kt
View file @
0eec1ad6
package
com.mints.goodmoney.mvp.presenters
import
android.content.Context
import
android.text.TextUtils
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.DeviceInfo
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
...
...
@@ -14,7 +12,6 @@ import com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.UserBean
import
com.mints.goodmoney.mvp.views.PanView
import
com.mints.goodmoney.utils.DeviceUuidFactory
import
net.grandcentrix.tray.AppPreferences
import
java.util.*
class
PanPresenter
:
BasePresenter
<
PanView
>()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/AccountMergeView.kt
0 → 100644
View file @
0eec1ad6
package
com.mints.goodmoney.mvp.views
interface
AccountMergeView
:
BaseView
{
fun
getKeepAccountMsgSuc
()
fun
getKeepAccountMsgFail
()
fun
toKeepAccountSuc
()
fun
toKeepAccountFail
()
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/net/LoanService.java
View file @
0eec1ad6
...
...
@@ -403,6 +403,22 @@ public interface LoanService {
@POST
(
"api/getUpEarlyClickButton"
)
Observable
<
BaseResponse
<
Object
>>
getUpEarlyClickButton
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 获取双账号用户信息
*
* @return
*/
@POST
(
"api/getKeepAccountMsg"
)
Observable
<
BaseResponse
<
Object
>>
getKeepAccountMsg
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 保留账号用户信息
*
* @return
*/
@POST
(
"api/toKeepAccount"
)
Observable
<
BaseResponse
<
Object
>>
toKeepAccount
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 默认http工厂
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AccountMergeActivity.kt
0 → 100644
View file @
0eec1ad6
package
com.mints.goodmoney.ui.activitys
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.mvp.presenters.AccountMergePresenter
import
com.mints.goodmoney.mvp.views.AccountMergeView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
kotlinx.android.synthetic.main.activity_account_merge.*
import
kotlinx.android.synthetic.main.header_layout.*
/**
* 描述:账号合并
* 作者:孟崔广
* 时间:2020/9/23 18:39
*/
class
AccountMergeActivity
:
BaseActivity
(),
View
.
OnClickListener
,
AccountMergeView
{
private
var
keepOneAccountKey
:
String
?
=
null
private
val
accountMergePresenter
by
lazy
{
AccountMergePresenter
()
}
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_account_merge
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
)
accountMergePresenter
.
attachView
(
this
)
initListener
()
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
accountMergePresenter
.
detachView
()
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
R
.
id
.
iv_left_icon
->
finish
()
R
.
id
.
btn_invite_left
->
{
}
R
.
id
.
btn_invite_right
->
{
}
}
}
private
fun
initListener
()
{
iv_left_icon
.
setOnClickListener
(
this
)
btn_invite_left
.
setOnClickListener
(
this
)
btn_invite_right
.
setOnClickListener
(
this
)
}
override
fun
getKeepAccountMsgSuc
()
{
}
override
fun
getKeepAccountMsgFail
()
{
}
override
fun
toKeepAccountSuc
()
{
}
override
fun
toKeepAccountFail
()
{
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/BindMobileActivity.kt
View file @
0eec1ad6
package
com.mints.goodmoney.ui.activitys
import
android.Manifest
import
android.os.Bundle
import
android.text.TextUtils
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.manager.YwhzManager
import
com.mints.goodmoney.mvp.presenters.LoginPresenter
import
com.mints.goodmoney.mvp.views.LoginView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.utils.BackInputUtil
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.tbruyelle.rxpermissions.RxPermissions
import
kotlinx.android.synthetic.main.activity_bind_mobile.*
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/CoinRecordActivity.kt
View file @
0eec1ad6
package
com.mints.goodmoney.ui.activitys
import
android.view.View
import
androidx.recyclerview.widget.DividerItemDecoration
import
com.mints.goodmoney.R
import
com.mints.goodmoney.manager.AppHttpManager
import
com.mints.goodmoney.mvp.model.BaseResponse
...
...
@@ -65,7 +64,6 @@ class CoinRecordActivity : BaseActivity(), View.OnClickListener, OnRefreshListen
}
private
fun
initRecy
()
{
// recy_drawcash.addItemDecoration(DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL))
coinRecordAdapter
=
CoinRecordAdapter
(
this
,
mCoinData
)
recy_drawcash
.
adapter
=
coinRecordAdapter
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
View file @
0eec1ad6
package
com.mints.goodmoney.ui.activitys
import
android.os.Bundle
import
android.text.TextUtils
import
android.text.style.ClickableSpan
import
android.view.View
import
androidx.recyclerview.widget.GridLayoutManager
import
cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.wechat.friends.Wechat
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.login.LoginApi
import
com.mints.goodmoney.login.OnLoginListener
import
com.mints.goodmoney.manager.UserManager
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/FeedbackActivity.kt
View file @
0eec1ad6
...
...
@@ -43,14 +43,14 @@ class FeedbackActivity : BaseActivity()
iv_left_icon
.
setOnClickListener
(
this
)
btn_feedback_next
.
setOnClickListener
(
this
)
radioGroup
.
setOnCheckedChangeListener
(
RadioGroup
.
OnCheckedChangeListener
{
group
:
RadioGroup
?,
checkedId
:
Int
->
radioGroup
.
setOnCheckedChangeListener
{
_
:
RadioGroup
?,
checkedId
:
Int
->
when
(
checkedId
)
{
R
.
id
.
btn_opinion_type_1
->
typeName
=
"界面"
R
.
id
.
btn_opinion_type_2
->
typeName
=
"体验"
R
.
id
.
btn_opinion_type_3
->
typeName
=
"功能"
R
.
id
.
btn_opinion_type_4
->
typeName
=
"其他"
}
}
)
}
etFeedbackContent
.
addTextChangedListener
(
object
:
TextWatcher
{
override
fun
beforeTextChanged
(
s
:
CharSequence
,
start
:
Int
,
count
:
Int
,
after
:
Int
)
{}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/SharePagerAdapter.kt
0 → 100644
View file @
0eec1ad6
package
com.mints.goodmoney.ui.adapter
import
android.view.View
import
android.view.ViewGroup
import
androidx.viewpager.widget.PagerAdapter
class
SharePagerAdapter
(
views
:
List
<
View
>)
:
PagerAdapter
()
{
private
var
mViews
:
List
<
View
>
=
views
override
fun
getCount
()
=
mViews
.
size
override
fun
isViewFromObject
(
view
:
View
,
`object`
:
Any
)
=
view
==
`object`
override
fun
instantiateItem
(
container
:
ViewGroup
,
position
:
Int
):
Any
{
val
view
=
mViews
[
position
]
container
.
addView
(
view
)
return
view
}
override
fun
destroyItem
(
container
:
ViewGroup
,
position
:
Int
,
`object`
:
Any
)
{
container
.
removeView
(
`object`
as
View
)
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
View file @
0eec1ad6
...
...
@@ -4,13 +4,9 @@ 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
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
...
...
@@ -22,6 +18,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.WxLoginActivity
import
com.mints.goodmoney.ui.adapter.FriendsPagerAdapter
import
com.mints.goodmoney.ui.adapter.InvitedAdapter
import
com.mints.goodmoney.ui.fragment.base.BaseFragment
...
...
@@ -30,7 +27,6 @@ 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
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
...
...
@@ -362,31 +358,17 @@ 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()
// } else {
// val wechatSp = Platform.ShareParams()
// wechatSp.shareType = Platform.SHARE_WEBPAGE
// wechatSp.title = Constant.SHARE_TITLE
// wechatSp.text = Constant.SHARE_CONTENT
// wechatSp.imageData = ImageUtil.drawableToBitmap(ContextCompat.getDrawable(requireContext(), R.mipmap.ic_launcher))
// wechatSp.url = Constant.SHARE_URL
// val wechat = ShareSDK.getPlatform(Wechat.NAME)
// if (wechat.isClientValid) {
// // 执行图文分享
// wechat.share(wechatSp)
// } else {
// showToast("请先安装微信")
// }
// }
if
(!
UserManager
.
getInstance
().
userIsLogin
())
{
readyGo
(
WxLoginActivity
::
class
.
java
)
return
}
if
(!
ps
.
getBoolean
(
Constant
.
FIRST_SHARE_INVITED
,
false
))
{
// 第一次邀请提示弹框
firstWeChatInvite
()
}
else
{
shareImgDialog
()
}
}
R
.
id
.
tv_right_subtitle
->
{
...
...
@@ -470,6 +452,9 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
}
}
/**
* 图片分享
*/
private
fun
shareImgDialog
()
{
val
shareDialog
=
ShareDialog
(
requireActivity
())
shareDialog
.
show
()
...
...
@@ -491,19 +476,7 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
R
.
id
.
dialog_btn_right
->
{
ps
.
put
(
Constant
.
FIRST_SHARE_INVITED
,
true
)
val
wechatSp
=
Platform
.
ShareParams
()
wechatSp
.
shareType
=
Platform
.
SHARE_WEBPAGE
wechatSp
.
title
=
Constant
.
SHARE_TITLE
wechatSp
.
text
=
Constant
.
SHARE_CONTENT
wechatSp
.
imageData
=
ImageUtil
.
drawableToBitmap
(
ContextCompat
.
getDrawable
(
requireContext
(),
R
.
mipmap
.
ic_launcher
))
wechatSp
.
url
=
Constant
.
SHARE_URL
val
wechat
=
ShareSDK
.
getPlatform
(
Wechat
.
NAME
)
if
(
wechat
.
isClientValid
)
{
// 执行图文分享
wechat
.
share
(
wechatSp
)
}
else
{
showToast
(
"请先安装微信"
)
}
shareImgDialog
()
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
0eec1ad6
...
...
@@ -32,7 +32,9 @@ import com.mints.goodmoney.ui.adapter.listener.OnItemChildClickListener
import
com.mints.goodmoney.ui.fragment.base.BaseFragment
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.utils.ImageUtil
import
com.mints.goodmoney.utils.QQJumpUtil
import
com.mints.goodmoney.utils.SpanUtils
import
com.mints.library.net.netstatus.NetUtils
import
com.mints.library.utils.CommonUtils
...
...
@@ -154,7 +156,6 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
super
.
onResume
()
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_MY
)
{
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
myPresenter
.
getAutoUserHallBaseMsg
()
}
else
{
...
...
@@ -214,7 +215,6 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
bannerFlag
=
true
data
?.
let
{
item_promotions_egv
.
visibility
=
View
.
VISIBLE
divider_hot
.
visibility
=
View
.
VISIBLE
hotList
=
it
.
list
item_promotions_egv
.
adapter
=
GvMyAdapter
(
mContext
,
requireActivity
(),
hotList
)
}
...
...
@@ -246,7 +246,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
override
fun
getHallBaseMsgSuc
(
data
:
UserTaskMsgBean
)
{
if
(
activity
==
null
||
activity
!!
.
isFinishing
)
{
if
(
requireActivity
()
.
isFinishing
)
{
return
}
...
...
@@ -449,7 +449,8 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
if
(
taskBean
.
otherConfig
!=
null
)
{
when
(
taskBean
.
otherConfig
.
status
)
{
0
->
{
if
(!
userManager
.
userIsLogin
())
{
// 邀请好友
if
(!
UserManager
.
getInstance
().
userIsLogin
())
{
readyGo
(
WxLoginActivity
::
class
.
java
)
return
}
...
...
@@ -458,20 +459,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
// 第一次邀请提示弹框
firstWeChatInvite
()
}
else
{
val
wechatSp
=
ShareParams
()
wechatSp
.
shareType
=
Platform
.
SHARE_WEBPAGE
wechatSp
.
title
=
Constant
.
SHARE_TITLE
wechatSp
.
text
=
Constant
.
SHARE_CONTENT
wechatSp
.
imageData
=
ImageUtil
.
drawableToBitmap
(
ContextCompat
.
getDrawable
(
requireContext
(),
R
.
mipmap
.
ic_launcher
))
wechatSp
.
url
=
Constant
.
SHARE_URL
val
wechat
=
ShareSDK
.
getPlatform
(
Wechat
.
NAME
)
if
(
wechat
.
isClientValid
)
{
myPresenter
.
cmtShareStatus
()
// 执行图文分享
wechat
.
share
(
wechatSp
)
}
else
{
showToast
(
"请先安装微信"
)
}
shareImgDialog
()
}
}
1
->
{
...
...
@@ -482,29 +470,42 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
2
->
{
if
(!
userManager
.
userIsLogin
())
{
// 邀请好友
if
(!
UserManager
.
getInstance
().
userIsLogin
())
{
readyGo
(
WxLoginActivity
::
class
.
java
)
return
}
if
(!
ps
.
getBoolean
(
Constant
.
FIRST_SHARE_MY
,
false
))
{
// 第一次邀请提示弹框
firstWeChatInvite
()
}
else
{
val
wechatSp
=
ShareParams
()
wechatSp
.
shareType
=
Platform
.
SHARE_WEBPAGE
wechatSp
.
title
=
Constant
.
SHARE_TITLE
wechatSp
.
text
=
Constant
.
SHARE_CONTENT
wechatSp
.
imageData
=
ImageUtil
.
drawableToBitmap
(
ContextCompat
.
getDrawable
(
requireContext
(),
R
.
mipmap
.
ic_launcher
))
wechatSp
.
url
=
Constant
.
SHARE_URL
val
wechat
=
ShareSDK
.
getPlatform
(
Wechat
.
NAME
)
if
(
wechat
.
isClientValid
)
{
myPresenter
.
cmtShareStatus
()
// 执行图文分享
wechat
.
share
(
wechatSp
)
}
else
{
showToast
(
"请先安装微信"
)
}
shareImgDialog
()
}
// if (!userManager.userIsLogin()) {
// readyGo(WxLoginActivity::class.java)
// }
//
// if (!ps.getBoolean(Constant.FIRST_SHARE_MY, false)) {
// // 第一次邀请提示弹框
// firstWeChatInvite()
// } else {
// val wechatSp = ShareParams()
// wechatSp.shareType = Platform.SHARE_WEBPAGE
// wechatSp.title = Constant.SHARE_TITLE
// wechatSp.text = Constant.SHARE_CONTENT
// wechatSp.imageData = ImageUtil.drawableToBitmap(ContextCompat.getDrawable(requireContext(), R.mipmap.ic_launcher))
// wechatSp.url = Constant.SHARE_URL
// val wechat = ShareSDK.getPlatform(Wechat.NAME)
// if (wechat.isClientValid) {
// myPresenter.cmtShareStatus()
// // 执行图文分享
// wechat.share(wechatSp)
// } else {
// showToast("请先安装微信")
// }
// }
}
}
}
...
...
@@ -766,7 +767,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
R
.
id
.
dialog_btn_right
->
{
CustomerServiceManager
.
joinQQ
(
activity
!!
)
QQJumpUtil
.
jumpQQ
(
requireActivity
()
)
}
}
}
...
...
@@ -793,7 +794,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
R
.
id
.
dialog_btn_right
->
{
userConfig
?.
let
{
CustomerServiceManager
.
joinQQGroup
(
it
.
qqMsg
.
useqq
.
url
,
activity
!!
)
QQJumpUtil
.
jumpQQGroup
(
it
.
qqMsg
.
useqq
.
url
,
requireActivity
()
)
}
}
}
...
...
@@ -822,20 +823,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
R
.
id
.
dialog_btn_right
->
{
ps
.
put
(
Constant
.
FIRST_SHARE_MY
,
true
)
val
wechatSp
=
ShareParams
()
wechatSp
.
shareType
=
Platform
.
SHARE_WEBPAGE
wechatSp
.
title
=
Constant
.
SHARE_TITLE
wechatSp
.
text
=
Constant
.
SHARE_CONTENT
wechatSp
.
imageData
=
ImageUtil
.
drawableToBitmap
(
ContextCompat
.
getDrawable
(
requireContext
(),
R
.
mipmap
.
ic_launcher
))
wechatSp
.
url
=
Constant
.
SHARE_URL
val
wechat
=
ShareSDK
.
getPlatform
(
Wechat
.
NAME
)
if
(
wechat
.
isClientValid
)
{
myPresenter
.
cmtShareStatus
()
// 执行图文分享
wechat
.
share
(
wechatSp
)
}
else
{
showToast
(
"请先安装微信"
)
}
shareImgDialog
()
}
}
}
...
...
@@ -846,4 +834,12 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
cdaa
!!
.
setRight
(
"打开微信"
)
cdaa
!!
.
show
()
}
/**
* 图片分享
*/
private
fun
shareImgDialog
()
{
val
shareDialog
=
ShareDialog
(
requireActivity
())
shareDialog
.
show
()
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/CornerView.java
0 → 100644
View file @
0eec1ad6
package
com
.
mints
.
goodmoney
.
ui
.
widgets
;
import
android.content.Context
;
import
android.graphics.Canvas
;
import
android.graphics.Color
;
import
android.graphics.Paint
;
import
android.graphics.PorterDuff
;
import
android.graphics.PorterDuffXfermode
;
import
android.graphics.RectF
;
import
android.util.AttributeSet
;
import
android.widget.FrameLayout
;
public
class
CornerView
extends
FrameLayout
{
public
CornerView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
init
();
}
public
CornerView
(
Context
context
)
{
super
(
context
);
init
();
}
private
final
RectF
roundRect
=
new
RectF
();
private
float
rect_adius
=
10
;
private
final
Paint
maskPaint
=
new
Paint
();
private
final
Paint
zonePaint
=
new
Paint
();
private
void
init
()
{
maskPaint
.
setAntiAlias
(
true
);
maskPaint
.
setXfermode
(
new
PorterDuffXfermode
(
PorterDuff
.
Mode
.
SRC_IN
));
zonePaint
.
setAntiAlias
(
true
);
zonePaint
.
setColor
(
Color
.
WHITE
);
float
density
=
getResources
().
getDisplayMetrics
().
density
;
rect_adius
=
rect_adius
*
density
;
}
public
void
setCorner
(
float
adius
)
{
rect_adius
=
adius
;
invalidate
();
}
@Override
protected
void
onLayout
(
boolean
changed
,
int
left
,
int
top
,
int
right
,
int
bottom
)
{
super
.
onLayout
(
changed
,
left
,
top
,
right
,
bottom
);
int
w
=
getWidth
();
int
h
=
getHeight
();
roundRect
.
set
(
0
,
0
,
w
,
h
);
}
@Override
public
void
draw
(
Canvas
canvas
)
{
canvas
.
saveLayer
(
roundRect
,
zonePaint
,
Canvas
.
ALL_SAVE_FLAG
);
canvas
.
drawRoundRect
(
roundRect
,
rect_adius
,
rect_adius
,
zonePaint
);
canvas
.
saveLayer
(
roundRect
,
maskPaint
,
Canvas
.
ALL_SAVE_FLAG
);
super
.
draw
(
canvas
);
canvas
.
restore
();
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/ShareDialog.kt
View file @
0eec1ad6
...
...
@@ -3,15 +3,12 @@ package com.mints.goodmoney.ui.widgets
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.view.*
import
android.widget.CheckBox
import
android.widget.ImageView
import
android.widget.LinearLayout
import
android.widget.RelativeLayout
import
android.widget.TextView
import
androidx.
core.content.ContextCompat
import
androidx.
viewpager.widget.ViewPager
import
cn.sharesdk.framework.Platform
import
cn.sharesdk.framework.Platform.ShareParams
import
cn.sharesdk.framework.ShareSDK
...
...
@@ -20,33 +17,36 @@ import cn.sharesdk.wechat.moments.WechatMoments
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.utils.ImageUtil
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.ui.adapter.SharePagerAdapter
import
com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils
import
com.mints.goodmoney.utils.QRCodeUtil
import
com.mints.goodmoney.utils.ToastUtil
import
com.mints.library.utils.GlideUtils
class
ShareDialog
(
context
:
Context
)
:
Dialog
(
context
,
R
.
style
.
dialog
)
{
class
ShareDialog
(
context
:
Context
)
:
Dialog
(
context
,
R
.
style
.
dialog
)
{
private
val
lp
:
WindowManager
.
LayoutParams
private
val
llDialogShareWx
:
LinearLayout
private
val
llDialogShareQq
:
LinearLayout
private
val
imgShare
:
ImageView
private
val
imgQrCode
:
ImageView
private
val
rlView
:
RelativeLayout
private
val
tvDialogShareNext
:
TextView
private
val
viewPager
:
ViewPager
private
val
pagerAdapter
:
SharePagerAdapter
private
val
wechat
by
lazy
{
ShareSDK
.
getPlatform
(
Wechat
.
NAME
)
}
private
val
wechatMoments
by
lazy
{
ShareSDK
.
getPlatform
(
WechatMoments
.
NAME
)
}
init
{
setContentView
(
R
.
layout
.
dialog_share
)
// 设置window属性
lp
=
window
!!
.
attributes
lp
.
gravity
=
Gravity
.
BOTTOM
lp
.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
lp
.
height
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
lp
.
windowAnimations
=
R
.
style
.
DialogAnimBottom
window
!!
.
attributes
=
lp
window
?.
let
{
val
lp
=
it
.
attributes
lp
.
gravity
=
Gravity
.
BOTTOM
lp
.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
lp
.
height
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
lp
.
windowAnimations
=
R
.
style
.
DialogAnimBottom
it
.
attributes
=
lp
}
// 设置外部不可关闭
setCancelable
(
false
)
...
...
@@ -55,16 +55,74 @@ class ShareDialog(context: Context) :
i
==
KeyEvent
.
KEYCODE_BACK
}
// 查找View
llDialogShareWx
=
findViewById
<
View
>(
R
.
id
.
llDialogShareWx
)
as
LinearLayout
llDialogShareQq
=
findViewById
<
View
>(
R
.
id
.
llDialogShareQq
)
as
LinearLayout
imgShare
=
findViewById
<
View
>(
R
.
id
.
img_share
)
as
ImageView
imgQrCode
=
findViewById
<
View
>(
R
.
id
.
img_qr_code
)
as
ImageView
rlView
=
findViewById
<
View
>(
R
.
id
.
rl_view
)
as
RelativeLayout
tvDialogShareNext
=
findViewById
<
View
>(
R
.
id
.
tvDialogShareNext
)
as
TextView
// llDialogShareWx.setOnClickListener(listener)
// llDialogShareQq.setOnClickListener(listener)
// tvDialogShareNext.setOnClickListener(listener)
viewPager
=
findViewById
(
R
.
id
.
view_pager
)
viewPager
.
pageMargin
=
BubbleUtils
.
dp2px
(
20
)
val
QRCode
=
QRCodeUtil
.
createQRCode
(
Constant
.
SHARE_URL
,
80
)
val
inflater
=
LayoutInflater
.
from
(
context
)
val
view1
=
inflater
.
inflate
(
R
.
layout
.
item_share_view
,
null
)
val
view2
=
inflater
.
inflate
(
R
.
layout
.
item_share_view
,
null
)
view1
.
findViewById
<
View
>(
R
.
id
.
item_iv_bg
).
setBackgroundResource
(
R
.
mipmap
.
bg_share_1
)
view2
.
findViewById
<
View
>(
R
.
id
.
item_iv_bg
).
setBackgroundResource
(
R
.
mipmap
.
bg_share_2
)
view1
.
findViewById
<
ImageView
>(
R
.
id
.
item_iv_qrcode
).
setImageBitmap
(
QRCode
)
view2
.
findViewById
<
ImageView
>(
R
.
id
.
item_iv_qrcode
).
setImageBitmap
(
QRCode
)
val
avatar1
=
view1
.
findViewById
<
ImageView
>(
R
.
id
.
item_iv_avatar
)
val
avatar2
=
view2
.
findViewById
<
ImageView
>(
R
.
id
.
item_iv_avatar
)
val
name1
=
view1
.
findViewById
<
TextView
>(
R
.
id
.
item_tv_name
)
val
name2
=
view2
.
findViewById
<
TextView
>(
R
.
id
.
item_tv_name
)
val
info1
=
view1
.
findViewById
<
TextView
>(
R
.
id
.
item_tv_info
)
val
info2
=
view2
.
findViewById
<
TextView
>(
R
.
id
.
item_tv_info
)
val
userManager
=
UserManager
.
getInstance
()
GlideUtils
.
loadImageViewLoding
(
context
,
userManager
.
wxHeader
,
avatar1
,
R
.
mipmap
.
ic_my
,
R
.
mipmap
.
ic_my
)
GlideUtils
.
loadImageViewLoding
(
context
,
userManager
.
wxHeader
,
avatar2
,
R
.
mipmap
.
ic_my
,
R
.
mipmap
.
ic_my
)
if
(
userManager
.
wxName
.
isEmpty
())
{
var
mobile
=
userManager
.
mobile
if
(
mobile
.
isNotEmpty
())
{
mobile
=
mobile
.
substring
(
0
,
3
)
+
"****"
+
mobile
.
substring
(
mobile
.
length
-
4
,
mobile
.
length
)
}
name1
.
text
=
"手机:$mobile"
name2
.
text
=
"手机:$mobile"
}
else
{
name1
.
text
=
userManager
.
wxName
name2
.
text
=
userManager
.
wxName
}
info1
.
text
=
"送你一个赚钱的新模式,快点加入跟我一起赚钱吧"
info2
.
text
=
"送你一个赚钱的新模式,快点加入跟我一起赚钱吧"
val
cb2
=
view2
.
findViewById
<
CheckBox
>(
R
.
id
.
item_cb_check
)
val
cb1
=
view1
.
findViewById
<
CheckBox
>(
R
.
id
.
item_cb_check
)
cb1
.
isChecked
=
true
viewPager
.
addOnPageChangeListener
(
object
:
ViewPager
.
OnPageChangeListener
{
override
fun
onPageScrolled
(
position
:
Int
,
positionOffset
:
Float
,
positionOffsetPixels
:
Int
)
{
}
override
fun
onPageSelected
(
position
:
Int
)
{
if
(
position
==
0
)
{
cb1
.
isChecked
=
true
cb2
.
isChecked
=
false
}
else
{
cb1
.
isChecked
=
false
cb2
.
isChecked
=
true
}
}
override
fun
onPageScrollStateChanged
(
state
:
Int
)
{}
})
val
views
=
arrayListOf
<
View
>()
views
.
add
(
view1
)
views
.
add
(
view2
)
pagerAdapter
=
SharePagerAdapter
(
views
)
viewPager
.
adapter
=
pagerAdapter
llDialogShareWx
.
setOnClickListener
{
shareWechat
()
...
...
@@ -78,22 +136,19 @@ class ShareDialog(context: Context) :
dismiss
()
}
val
QRCode
=
QRCodeUtil
.
createQRCode
(
Constant
.
SHARE_URL
,
100
)
imgQrCode
.
setImageBitmap
(
QRCode
)
}
private
fun
shareWechat
()
{
rlView
.
isDrawingCacheEnabled
=
true
rlView
.
drawingCacheQuality
=
View
.
DRAWING_CACHE_QUALITY_HIGH
rlView
.
buildDrawingCache
()
val
bitmap
:
Bitmap
=
rlView
.
drawingCache
val
currentItem
=
viewPager
.
currentItem
val
child
=
viewPager
.
getChildAt
(
currentItem
).
findViewById
<
View
>(
R
.
id
.
item_iv_bg
)
child
.
isDrawingCacheEnabled
=
true
child
.
drawingCacheQuality
=
View
.
DRAWING_CACHE_QUALITY_HIGH
child
.
buildDrawingCache
()
val
bitmap
:
Bitmap
=
child
.
drawingCache
val
wechatSp
=
ShareParams
()
wechatSp
.
shareType
=
Platform
.
SHARE_IMAGE
wechatSp
.
title
=
Constant
.
SHARE_TITLE
wechatSp
.
text
=
Constant
.
SHARE_CONTENT
wechatSp
.
imageData
=
bitmap
wechatSp
.
url
=
Constant
.
SHARE_URL
if
(
wechat
.
isClientValid
)
{
wechat
.
share
(
wechatSp
)
...
...
@@ -103,14 +158,17 @@ class ShareDialog(context: Context) :
}
private
fun
shareWechatFavoite
()
{
rlView
.
isDrawingCacheEnabled
=
true
rlView
.
drawingCacheQuality
=
View
.
DRAWING_CACHE_QUALITY_HIGH
rlView
.
buildDrawingCache
()
val
bitmap
:
Bitmap
=
rlView
.
drawingCache
val
currentItem
=
viewPager
.
currentItem
val
child
=
viewPager
.
getChildAt
(
currentItem
).
findViewById
<
View
>(
R
.
id
.
item_iv_bg
)
child
.
isDrawingCacheEnabled
=
true
child
.
drawingCacheQuality
=
View
.
DRAWING_CACHE_QUALITY_HIGH
child
.
buildDrawingCache
()
val
bitmap
:
Bitmap
=
child
.
drawingCache
val
wechatSp
=
ShareParams
()
wechatSp
.
shareType
=
Platform
.
SHARE_IMAGE
wechatSp
.
imageData
=
bitmap
if
(
wechatMoments
.
isClientValid
)
{
wechatMoments
.
share
(
wechatSp
)
}
else
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/
manager/CustomerServiceManager
.kt
→
GoodMoney/app/src/main/java/com/mints/goodmoney/
utils/QQJumpUtil
.kt
View file @
0eec1ad6
package
com.mints.goodmoney.
manager
package
com.mints.goodmoney.
utils
import
android.app.Activity
import
android.content.Intent
import
android.net.Uri
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.utils.ToastUtil
/**
* 客服管理
*/
object
CustomerServiceManager
{
object
QQJumpUtil
{
private
const
val
QQCustomerNum
=
"2504421942"
/**
* 跳转QQ聊天界面
*/
fun
j
oin
QQ
(
activity
:
Activity
)
{
fun
j
ump
QQ
(
activity
:
Activity
)
{
try
{
//第二种方式:可以跳转到添加好友,如果qq号是好友了,直接聊天
val
url
=
"mqqwpa://im/chat?chat_type=wpa&uin=$QQCustomerNum"
//uin是发送过去的qq号码
...
...
@@ -37,8 +33,7 @@ object CustomerServiceManager {
* @param key 由官网生成的key
* @return 返回true表示呼起手Q成功,返回false表示呼起失败
******************/
fun
joinQQGroup
(
url
:
String
,
activity
:
Activity
)
{
fun
jumpQQGroup
(
url
:
String
,
activity
:
Activity
)
{
val
intent
=
Intent
()
intent
.
data
=
Uri
.
parse
(
url
)
// 此Flag可根据具体产品需要自定义,如设置,则在加群界面按返回,返回手Q主界面,不设置,按返回会返回到呼起产品界面 //intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
...
...
@@ -49,5 +44,4 @@ object CustomerServiceManager {
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
"您还没有安装QQ,请先安装软件"
)
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/QRCodeUtil.java
View file @
0eec1ad6
...
...
@@ -2,15 +2,19 @@ package com.mints.goodmoney.utils;
import
android.graphics.Bitmap
;
import
android.graphics.Matrix
;
import
android.text.TextUtils
;
import
com.google.zxing.BarcodeFormat
;
import
com.google.zxing.EncodeHintType
;
import
com.google.zxing.MultiFormatWriter
;
import
com.google.zxing.WriterException
;
import
com.google.zxing.common.BitMatrix
;
import
com.google.zxing.qrcode.QRCodeWriter
;
import
com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
;
import
java.util.HashMap
;
import
java.util.Hashtable
;
import
java.util.Map
;
public
class
QRCodeUtil
{
...
...
@@ -25,8 +29,9 @@ public class QRCodeUtil {
try
{
Hashtable
<
EncodeHintType
,
Object
>
hints
=
new
Hashtable
<>();
hints
.
put
(
EncodeHintType
.
CHARACTER_SET
,
"utf-8"
);
hints
.
put
(
EncodeHintType
.
ERROR_CORRECTION
,
ErrorCorrectionLevel
.
M
);
hints
.
put
(
EncodeHintType
.
MARGIN
,
1
);
hints
.
put
(
EncodeHintType
.
ERROR_CORRECTION
,
ErrorCorrectionLevel
.
H
);
hints
.
put
(
EncodeHintType
.
MARGIN
,
0
);
BitMatrix
bitMatrix
=
new
QRCodeWriter
().
encode
(
text
,
BarcodeFormat
.
QR_CODE
,
size
,
size
,
hints
);
int
[]
pixels
=
new
int
[
size
*
size
];
...
...
@@ -42,9 +47,9 @@ public class QRCodeUtil {
Bitmap
bitmap
=
Bitmap
.
createBitmap
(
size
,
size
,
Bitmap
.
Config
.
RGB_565
);
bitmap
.
setPixels
(
pixels
,
0
,
size
,
0
,
0
,
size
,
size
);
Bitmap
zoomBitmap
=
zoomBitmap
(
bitmap
,
size
,
size
);
bitmap
.
recycle
();
return
zoomB
itmap
;
//
Bitmap zoomBitmap = zoomBitmap(bitmap, size, size);
//
bitmap.recycle();
return
b
itmap
;
}
catch
(
WriterException
e
)
{
e
.
printStackTrace
();
return
null
;
...
...
GoodMoney/app/src/main/res/layout/activity_aboutus.xml
View file @
0eec1ad6
...
...
@@ -10,7 +10,8 @@
<com.mints.goodmoney.ui.widgets.ElasticScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:fillViewport=
"true"
>
android:fillViewport=
"true"
android:overScrollMode=
"never"
>
<LinearLayout
android:layout_width=
"match_parent"
...
...
GoodMoney/app/src/main/res/layout/activity_account_merge.xml
0 → 100644
View file @
0eec1ad6
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
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"
>
<include
layout=
"@layout/header_layout"
/>
<com.mints.goodmoney.ui.widgets.ElasticScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:overScrollMode=
"never"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingTop=
"50dp"
>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<com.mints.goodmoney.ui.widgets.CircleImageView
android:id=
"@+id/civ_avatar_left"
android:layout_width=
"70dp"
android:layout_height=
"70dp"
android:src=
"@mipmap/ic_my"
/>
<TextView
android:id=
"@+id/tv_name_left"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:text=
"@string/app_name"
android:textColor=
"@color/black"
/>
<TextView
android:id=
"@+id/tv_coin_left"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"30dp"
android:drawablePadding=
"6dp"
android:text=
"@string/app_name"
android:textColor=
"@color/black"
app:drawableStartCompat=
"@mipmap/ic_draw_gold"
/>
<TextView
android:id=
"@+id/tv_bonus_left"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:drawablePadding=
"6dp"
android:text=
"@string/app_name"
android:textColor=
"@color/black"
app:drawableStartCompat=
"@mipmap/ic_friends_enable"
/>
<TextView
android:id=
"@+id/tv_invited_left"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:drawablePadding=
"6dp"
android:text=
"@string/app_name"
android:textColor=
"@color/black"
app:drawableStartCompat=
"@mipmap/ic_friends_enable"
/>
<Button
android:id=
"@+id/btn_invite_left"
android:layout_width=
"100dp"
android:layout_height=
"40dp"
android:layout_marginTop=
"20dp"
android:layout_marginBottom=
"10dp"
android:background=
"@drawable/shape_btn_switch"
android:text=
"保留"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
</LinearLayout>
<ImageView
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_gravity=
"center_vertical"
android:src=
"@mipmap/icon_exchange"
/>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<com.mints.goodmoney.ui.widgets.CircleImageView
android:id=
"@+id/civ_avatar_right"
android:layout_width=
"70dp"
android:layout_height=
"70dp"
android:src=
"@mipmap/ic_my"
/>
<TextView
android:id=
"@+id/tv_name_right"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:text=
"@string/app_name"
android:textColor=
"@color/black"
/>
<TextView
android:id=
"@+id/tv_coin_right"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"30dp"
android:drawablePadding=
"6dp"
android:text=
"@string/app_name"
android:textColor=
"@color/black"
app:drawableEndCompat=
"@mipmap/ic_draw_gold"
/>
<TextView
android:id=
"@+id/tv_bonus_right"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:drawablePadding=
"6dp"
android:text=
"@string/app_name"
android:textColor=
"@color/black"
app:drawableEndCompat=
"@mipmap/ic_friends_enable"
/>
<TextView
android:id=
"@+id/tv_invited_right"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:drawablePadding=
"6dp"
android:text=
"@string/app_name"
android:textColor=
"@color/black"
app:drawableEndCompat=
"@mipmap/ic_friends_enable"
/>
<Button
android:id=
"@+id/btn_invite_right"
android:layout_width=
"100dp"
android:layout_height=
"40dp"
android:layout_marginTop=
"20dp"
android:layout_marginBottom=
"10dp"
android:background=
"@drawable/shape_btn_switch"
android:text=
"保留"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
</LinearLayout>
</LinearLayout>
</com.mints.goodmoney.ui.widgets.ElasticScrollView>
</LinearLayout>
GoodMoney/app/src/main/res/layout/activity_drawcash.xml
View file @
0eec1ad6
...
...
@@ -11,7 +11,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:
background=
"@color/white
"
>
android:
overScrollMode=
"never
"
>
<LinearLayout
android:layout_width=
"match_parent"
...
...
@@ -85,7 +85,7 @@
android:id=
"@+id/tvDrawcashName"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawable
Lef
t=
"@mipmap/ic_draw_wx"
android:drawable
Star
t=
"@mipmap/ic_draw_wx"
android:drawablePadding=
"4dp"
android:gravity=
"center_vertical"
android:text=
"微信昵称"
/>
...
...
@@ -94,7 +94,7 @@
android:id=
"@+id/tvDrawcashWx"
android:layout_width=
"80dp"
android:layout_height=
"30dp"
android:layout_alignParent
Right
=
"true"
android:layout_alignParent
End
=
"true"
android:background=
"@drawable/shape_login_code"
android:gravity=
"center"
android:text=
"去授权"
...
...
@@ -144,36 +144,36 @@
android:orientation=
"vertical"
>
<RelativeLayout
<!-- <RelativeLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginTop="10dp"-->
<!-- android:layout_marginBottom="10dp">-->
<!-- <TextView-->
<!-- android:id="@+id/tv_drawcash_hint"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:layout_marginStart="15dp"-->
<!-- android:text="所需金币:3000"-->
<!-- android:textColor="@color/black_text"-->
<!-- android:textSize="14sp"-->
<!-- android:visibility="gone" />-->
<TextView
android:id=
"@+id/tvDrawcashNext"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"40dp"
android:layout_marginLeft=
"20dp"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"10dp"
>
<TextView
android:id=
"@+id/tv_drawcash_hint"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"15dp"
android:text=
"所需金币:3000"
android:textColor=
"@color/color_333"
android:textSize=
"14sp"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/tvDrawcashNext"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:layout_alignParentRight=
"true"
android:layout_marginLeft=
"20dp"
android:layout_marginRight=
"20dp"
android:background=
"@drawable/shape_tv_gold"
android:gravity=
"center"
android:text=
"立即提现"
android:textColor=
"@color/white"
android:textSize=
"14sp"
/>
</RelativeLayout>
android:layout_marginRight=
"20dp"
android:layout_marginBottom=
"10dp"
android:background=
"@drawable/shape_tv_gold"
android:gravity=
"center"
android:text=
"立即提现"
android:textColor=
"@color/white"
android:textSize=
"14sp"
/>
</LinearLayout>
</LinearLayout>
GoodMoney/app/src/main/res/layout/activity_feekback.xml
View file @
0eec1ad6
...
...
@@ -24,7 +24,7 @@
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin
Lef
t=
"15dp"
android:layout_margin
Star
t=
"15dp"
android:text=
"反馈类型"
android:textColor=
"@android:color/black"
android:textSize=
"15dp"
/>
...
...
@@ -40,49 +40,49 @@
style=
"?android:attr/borderlessButtonStyle"
android:layout_width=
"58dp"
android:layout_height=
"25dp"
android:layout_margin
Lef
t=
"5dp"
android:layout_margin
Star
t=
"5dp"
android:background=
"@drawable/rb_opinion_selected"
android:button=
"@null"
android:checked=
"true"
android:text=
"界面"
android:textColor=
"@drawable/rb_opinion_selected"
android:textSize=
"12
d
p"
/>
android:textSize=
"12
s
p"
/>
<RadioButton
android:id=
"@+id/btn_opinion_type_2"
style=
"?android:attr/borderlessButtonStyle"
android:layout_width=
"58dp"
android:layout_height=
"25dp"
android:layout_margin
Lef
t=
"5dp"
android:layout_margin
Star
t=
"5dp"
android:background=
"@drawable/rb_opinion_selected"
android:button=
"@null"
android:text=
"体验"
android:textColor=
"@drawable/rb_opinion_selected"
android:textSize=
"12
d
p"
/>
android:textSize=
"12
s
p"
/>
<RadioButton
android:id=
"@+id/btn_opinion_type_3"
style=
"?android:attr/borderlessButtonStyle"
android:layout_width=
"58dp"
android:layout_height=
"25dp"
android:layout_margin
Lef
t=
"5dp"
android:layout_margin
Star
t=
"5dp"
android:background=
"@drawable/rb_opinion_selected"
android:button=
"@null"
android:text=
"功能"
android:textColor=
"@drawable/rb_opinion_selected"
android:textSize=
"12
d
p"
/>
android:textSize=
"12
s
p"
/>
<RadioButton
android:id=
"@+id/btn_opinion_type_4"
style=
"?android:attr/borderlessButtonStyle"
android:layout_width=
"58dp"
android:layout_height=
"25dp"
android:layout_margin
Lef
t=
"5dp"
android:layout_margin
Star
t=
"5dp"
android:background=
"@drawable/rb_opinion_selected"
android:button=
"@null"
android:text=
"其他"
android:textColor=
"@drawable/rb_opinion_selected"
android:textSize=
"12
d
p"
/>
android:textSize=
"12
s
p"
/>
</RadioGroup>
</LinearLayout>
...
...
@@ -108,16 +108,16 @@
android:background=
"@color/white"
android:gravity=
"top"
android:hint=
"请留下您的批评、表扬或者建议,我们会虚心听取, 认真改正。(请保持在5-150字内)"
android:textSize=
"13
d
p"
/>
android:textSize=
"13
s
p"
/>
<TextView
android:id=
"@+id/tvFeedbackCount"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParent
Right
=
"true"
android:layout_alignParent
End
=
"true"
android:layout_alignParentBottom=
"true"
android:text=
"0/150"
android:textSize=
"1
0d
p"
/>
android:textSize=
"1
2s
p"
/>
</RelativeLayout>
</LinearLayout>
...
...
GoodMoney/app/src/main/res/layout/dialog_share.xml
View file @
0eec1ad6
...
...
@@ -6,50 +6,18 @@
android:layout_marginTop=
"30dp"
android:background=
"@color/transparent"
>
<
RelativeLayout
android:id=
"@+id/
rl_view
"
<
androidx.viewpager.widget.ViewPager
android:id=
"@+id/
view_pager
"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"20dp"
android:background=
"@color/white"
android:gravity=
"center_horizontal"
android:layout_height=
"450dp"
android:layout_marginBottom=
"30dp"
android:clipToPadding=
"false"
android:paddingStart=
"60dp"
android:paddingEnd=
"60dp"
app:layout_constraintBottom_toTopOf=
"@+id/linearLayout"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<ImageView
android:id=
"@+id/img_share"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/bg_eat"
/>
<TextView
android:id=
"@+id/tv_share_code"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/img_share"
android:layout_marginTop=
"20dp"
android:text=
"@string/app_name"
android:textColor=
"@color/color_FF9837"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_share_code"
android:layout_marginTop=
"10dp"
android:text=
"好玩好赚钱"
android:textColor=
"@color/color_FF9837"
/>
<ImageView
android:background=
"@color/color_FF9837"
android:id=
"@+id/img_qr_code"
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_below=
"@id/img_share"
android:layout_alignParentEnd=
"true"
/>
</RelativeLayout>
app:layout_constraintTop_toTopOf=
"parent"
/>
<LinearLayout
android:id=
"@+id/linearLayout"
...
...
GoodMoney/app/src/main/res/layout/fragment_main_friends.xml
View file @
0eec1ad6
...
...
@@ -364,9 +364,9 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"6dp"
android:drawableEnd=
"@mipmap/ic_question"
android:drawablePadding=
"6dp"
android:text=
"间接亲友"
/>
android:text=
"间接亲友"
app:drawableEndCompat=
"@mipmap/ic_question"
/>
</LinearLayout>
...
...
@@ -387,28 +387,26 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"@color/color_F8F8F8"
/>
</LinearLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>
<
Relative
Layout
<
Linear
Layout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_tab_friends"
android:elevation=
"2dp"
>
android:elevation=
"4dip"
android:orientation=
"vertical"
>
<com.androidkun.xtablayout.XTabLayout
android:id=
"@+id/tab_friends"
android:layout_width=
"wrap_content"
android:layout_height=
"
50dp
"
android:layout_
centerHorizontal=
"true
"
android:layout_height=
"
wrap_content
"
android:layout_
gravity=
"center_horizontal
"
app:xTabIndicatorColor=
"#FB560C"
app:xTabIndicatorHeight=
"3dp"
app:xTabIndicatorHeight=
"4dp"
app:xTabIndicatorRoundX=
"50dp"
app:xTabIndicatorRoundY=
"50dp"
app:xTabIndicatorWidth=
"36dp"
app:xTabMode=
"fixed"
app:xTabSelectedTextColor=
"#FB560C"
...
...
@@ -419,10 +417,9 @@
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_alignParentBottom=
"true"
android:background=
"@color/color_F8F8F8"
/>
android:background=
"@color/color_F8F"
/>
</
Relative
Layout>
</
Linear
Layout>
</com.google.android.material.appbar.AppBarLayout>
...
...
GoodMoney/app/src/main/res/layout/fragment_main_money.xml
View file @
0eec1ad6
...
...
@@ -12,7 +12,9 @@
android:layout_marginTop=
"25dp"
app:xTabIndicatorColor=
"#F28335"
app:xTabIndicatorHeight=
"4dp"
app:xTabIndicatorWidth=
"10dp"
app:xTabIndicatorRoundX=
"50dp"
app:xTabIndicatorRoundY=
"50dp"
app:xTabIndicatorWidth=
"30dp"
app:xTabMode=
"scrollable"
app:xTabSelectedTextColor=
"@color/color_FF9837"
app:xTabSelectedTextSize=
"22sp"
...
...
GoodMoney/app/src/main/res/layout/fragment_main_my.xml
View file @
0eec1ad6
...
...
@@ -35,16 +35,13 @@
<include
layout=
"@layout/item_fragment_main_my_clock"
/>
<include
layout=
"@layout/item_divider_gray"
/>
<FrameLayout
android:id=
"@+id/fl_my_banner"
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
/>
<include
android:id=
"@+id/divider_hot"
layout=
"@layout/item_divider_gray"
android:visibility=
"gone"
/>
android:layout_gravity=
"center_horizontal"
/>
<include
layout=
"@layout/item_fragment_main_my_promotions"
/>
...
...
GoodMoney/app/src/main/res/layout/item_share_view.xml
0 → 100644
View file @
0eec1ad6
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<com.mints.goodmoney.ui.widgets.CornerView
android:id=
"@+id/item_iv_bg"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_margin=
"10dp"
android:background=
"@drawable/shape_gold_card"
android:padding=
"10dp"
>
<com.mints.goodmoney.ui.widgets.CircleImageView
android:id=
"@+id/item_iv_avatar"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_centerVertical=
"true"
android:layout_marginEnd=
"10dp"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_toEndOf=
"@id/item_iv_avatar"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/item_tv_name"
android:layout_width=
"90dp"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:textColor=
"@color/black"
android:textSize=
"10sp"
/>
<TextView
android:id=
"@+id/item_tv_info"
android:layout_width=
"90dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2dp"
android:layout_marginBottom=
"2dp"
android:textSize=
"8sp"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/item_iv_qrcode"
android:layout_width=
"50dp"
android:layout_height=
"50dp"
android:layout_alignParentEnd=
"true"
/>
</RelativeLayout>
</com.mints.goodmoney.ui.widgets.CornerView>
<CheckBox
android:id=
"@+id/item_cb_check"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"10dp"
android:buttonTint=
"@color/color_00895B"
android:clickable=
"false"
/>
</FrameLayout>
\ No newline at end of file
GoodMoney/app/src/main/res/layout/view_title.xml
View file @
0eec1ad6
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:layout_marginStart=
"15dp"
android:layout_marginEnd=
"15dp"
>
<View
android:id=
"@+id/view"
android:layout_width=
"5dp"
android:layout_height=
"16dp"
android:layout_centerVertical=
"true"
android:background=
"@drawable/shape_view_dot"
/>
android:background=
"@drawable/shape_view_dot"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/view_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginStart=
"10dp"
android:textColor=
"@color/black"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
app:layout_constraintBottom_toBottomOf=
"@id/view"
app:layout_constraintStart_toEndOf=
"@id/view"
app:layout_constraintTop_toTopOf=
"@id/view"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_alignParentBottom=
"true"
android:background=
"@color/color_E6E6E6"
/>
android:background=
"@color/color_E6E6E6"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
</RelativeLayout>
\ No newline at end of file
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
GoodMoney/app/src/main/res/mipmap-xhdpi/bg_share_1.png
0 → 100644
View file @
0eec1ad6
955 KB
GoodMoney/app/src/main/res/mipmap-xhdpi/bg_share_2.png
0 → 100644
View file @
0eec1ad6
776 KB
GoodMoney/app/src/main/res/mipmap-xhdpi/icon_exchange.png
0 → 100644
View file @
0eec1ad6
3.9 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