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
d9038c85
Commit
d9038c85
authored
Dec 04, 2020
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
bc4f39b7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
33 deletions
+21
-33
AccountMergeActivity.kt
.../com/mints/goodmoney/ui/activitys/AccountMergeActivity.kt
+2
-2
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+8
-31
ShareDialog.kt
...c/main/java/com/mints/goodmoney/ui/widgets/ShareDialog.kt
+11
-0
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AccountMergeActivity.kt
View file @
d9038c85
...
...
@@ -40,10 +40,10 @@ class AccountMergeActivity : BaseActivity(), View.OnClickListener, AccountMergeV
tv_title
.
text
=
"账号绑定"
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
accountMergePresenter
.
attachView
(
this
)
initListener
()
accountMergePresenter
.
getKeepAccountMsg
(
keepOneAccountKey
)
}
override
fun
onDestroy
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
d9038c85
...
...
@@ -8,12 +8,7 @@ import android.os.Bundle
import
android.text.TextUtils
import
android.view.View
import
android.widget.AdapterView
import
androidx.core.content.ContextCompat
import
androidx.recyclerview.widget.DividerItemDecoration
import
cn.sharesdk.framework.Platform
import
cn.sharesdk.framework.Platform.ShareParams
import
cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.wechat.friends.Wechat
import
com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import
com.mints.goodmoney.BuildConfig
import
com.mints.goodmoney.R
...
...
@@ -33,7 +28,6 @@ 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
...
...
@@ -482,30 +476,6 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
else
{
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("请先安装微信")
// }
// }
}
}
}
...
...
@@ -822,6 +792,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
R
.
id
.
dialog_btn_right
->
{
ps
.
put
(
Constant
.
FIRST_SHARE_MY
,
true
)
cdaa
!!
.
dismiss
()
shareImgDialog
()
}
...
...
@@ -840,6 +811,12 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
*/
private
fun
shareImgDialog
()
{
val
shareDialog
=
ShareDialog
(
requireActivity
())
shareDialog
.
setOnShareOKListener
(
object
:
ShareDialog
.
OnShareOKListener
{
override
fun
onShareOk
()
{
myPresenter
.
cmtShareStatus
()
}
})
shareDialog
.
show
()
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/ShareDialog.kt
View file @
d9038c85
...
...
@@ -30,6 +30,8 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) {
private
val
llDialogShareQq
:
LinearLayout
private
val
tvDialogShareNext
:
TextView
private
var
mOnShareOKListener
:
OnShareOKListener
?
=
null
private
val
viewPager
:
ViewPager
private
val
pagerAdapter
:
SharePagerAdapter
...
...
@@ -135,7 +137,14 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) {
tvDialogShareNext
.
setOnClickListener
{
dismiss
()
}
}
fun
setOnShareOKListener
(
onShareOKListener
:
OnShareOKListener
)
{
mOnShareOKListener
=
onShareOKListener
}
interface
OnShareOKListener
{
fun
onShareOk
()
}
private
fun
shareWechat
()
{
...
...
@@ -151,6 +160,7 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) {
wechatSp
.
imageData
=
bitmap
if
(
wechat
.
isClientValid
)
{
mOnShareOKListener
?.
onShareOk
()
wechat
.
share
(
wechatSp
)
}
else
{
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
"请先安装微信"
)
...
...
@@ -170,6 +180,7 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) {
wechatSp
.
imageData
=
bitmap
if
(
wechatMoments
.
isClientValid
)
{
mOnShareOKListener
?.
onShareOk
()
wechatMoments
.
share
(
wechatSp
)
}
else
{
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
"请先安装微信"
)
...
...
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