Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
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_vedio
Commits
4bef18f9
Commit
4bef18f9
authored
Sep 22, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
2cb786fe
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
22 deletions
+47
-22
AlipayAuthManager.kt
...in/java/com/duben/dayplaylet/manager/AlipayAuthManager.kt
+21
-16
TaskAwardActivity.kt
...va/com/duben/dayplaylet/ui/activitys/TaskAwardActivity.kt
+12
-0
MainFragment.kt
...ain/java/com/duben/dayplaylet/ui/fragment/MainFragment.kt
+0
-2
shape_bg_task.xml
video/app/src/main/res/drawable/shape_bg_task.xml
+1
-1
shape_bg_task_progress.xml
video/app/src/main/res/drawable/shape_bg_task_progress.xml
+10
-0
activity_draw_progress.xml
video/app/src/main/res/layout/activity_draw_progress.xml
+1
-1
activity_task_award.xml
video/app/src/main/res/layout/activity_task_award.xml
+2
-2
ic_draw_quit.png
video/app/src/main/res/mipmap-xhdpi/ic_draw_quit.png
+0
-0
No files found.
video/app/src/main/java/com/duben/dayplaylet/manager/AlipayAuthManager.kt
View file @
4bef18f9
...
...
@@ -12,6 +12,7 @@ import com.duben.dayplaylet.mvp.model.BaseResponse
import
com.duben.dayplaylet.utils.ToastUtil
import
com.duben.library.net.neterror.BaseSubscriber
import
com.duben.library.net.neterror.Throwable
import
com.duben.library.utils.json.JsonUtil
import
java.lang.ref.WeakReference
/**
...
...
@@ -38,7 +39,9 @@ object AlipayAuthManager {
// 获取alipay_open_id,调支付时作为参数extern_token 的value
// 传入,则支付账户为该授权账户
UserManager
.
getInstance
().
alipaySet
=
true
println
(
"mcg -->>>>> authinfo="
+
JsonUtil
.
toJson
(
authResult
))
authListener
?.
authSuccess
()
commitAlipayAutoInfo
(
JsonUtil
.
toJson
(
authResult
))
}
else
{
// 其他状态值则为授权失败
authListener
?.
authFail
(
resultStatus
)
...
...
@@ -51,7 +54,7 @@ object AlipayAuthManager {
private
fun
commitAlipayAutoInfo
(
info
:
String
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
.
put
(
""
,
info
)
vo
.
put
(
"
authInfo
"
,
info
)
val
baseApplication
=
MintsApplication
.
getContext
()
as
MintsApplication
AppHttpManager
.
getInstance
(
baseApplication
)
.
call
(
baseApplication
.
loanService
.
cancelCollect
(
vo
),
...
...
@@ -72,17 +75,19 @@ object AlipayAuthManager {
fun
authV2
(
activity
:
Activity
,
listener
:
AuthListener
?)
{
authListener
=
listener
val
weakReference
=
WeakReference
(
activity
)
val
baseApplication
=
MintsApplication
.
getContext
()
as
MintsApplication
AppHttpManager
.
getInstance
(
baseApplication
)
.
call
(
baseApplication
.
loanService
.
homeV1Types
,
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
override
fun
onError
(
e
:
Throwable
)
{
}
println
(
"mcg -->>>>> 开始授权"
)
override
fun
onNext
(
t
:
BaseResponse
<
Any
>)
{
if
(
t
.
status
==
200
)
{
// val baseApplication = MintsApplication.getContext() as MintsApplication
// AppHttpManager.getInstance(baseApplication)
// .call(baseApplication.loanService.homeV1Types,
// object : BaseSubscriber<BaseResponse<Any>>() {
// override fun onError(e: Throwable) {
//
// }
//
//
// override fun onNext(t: BaseResponse<Any>) {
// if (t.status == 200) {
val
authInfo
=
""
val
authRunnable
=
Runnable
{
// 构造AuthTask 对象
val
authTask
=
AuthTask
(
weakReference
.
get
())
...
...
@@ -97,11 +102,11 @@ object AlipayAuthManager {
// 必须异步调用
val
authThread
=
Thread
(
authRunnable
)
authThread
.
start
()
}
else
{
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
t
.
message
)
}
}
})
//
} else {
//
ToastUtil.show(MintsApplication.getContext(), t.message)
//
}
//
}
//
})
}
private
var
authListener
:
AuthListener
?
=
null
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/activitys/TaskAwardActivity.kt
View file @
4bef18f9
...
...
@@ -6,6 +6,8 @@ import android.os.Looper
import
android.view.KeyEvent
import
android.view.View
import
android.widget.FrameLayout
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.duben.dayplaylet.R
import
com.duben.dayplaylet.ad.AdManager
import
com.duben.dayplaylet.ad.AdStatusListener
...
...
@@ -20,6 +22,7 @@ import com.duben.dayplaylet.utils.SpanUtils
import
com.duben.dayplaylet.utils.UIUtils
import
com.duben.library.utils.nodoubleclick.AntiShake
import
kotlinx.android.synthetic.main.activity_task_award.*
import
kotlinx.android.synthetic.main.dialog_sign.*
/**
* 个人中心-任务奖励
...
...
@@ -46,6 +49,8 @@ class TaskAwardActivity : BaseActivity(), View.OnClickListener {
private
var
redPacketFlag
=
false
private
var
yuanbaoFlag
=
false
private
var
rope
:
YoYo
.
YoYoString
?
=
null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_task_award
override
fun
isApplyKitKatTranslucency
()
=
false
...
...
@@ -97,6 +102,10 @@ class TaskAwardActivity : BaseActivity(), View.OnClickListener {
tv_award_yuanbao
.
text
=
"+${yuanbaoMore}"
initListener
()
Handler
().
postDelayed
({
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
500
).
repeat
(-
1
).
playOn
(
iv_task_award_ad
)
},
300
)
}
...
...
@@ -122,6 +131,9 @@ class TaskAwardActivity : BaseActivity(), View.OnClickListener {
override
fun
onDestroy
()
{
super
.
onDestroy
()
rope
?.
stop
()
rope
=
null
}
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
):
Boolean
{
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MainFragment.kt
View file @
4bef18f9
...
...
@@ -471,7 +471,6 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
override
fun
adClose
(
vo
:
HashMap
<
String
,
Any
>?)
{
println
(
"mcg -->>>>> lili"
)
hideLoading
()
adCloseNext
(
carrierType
)
}
...
...
@@ -479,7 +478,6 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
override
fun
adClose
(
vo
:
HashMap
<
String
,
Any
>?)
{
println
(
"mcg -->>>>> waiwai"
)
adCloseNext
(
carrierType
)
}
})
...
...
video/app/src/main/res/drawable/shape_bg_task.xml
View file @
4bef18f9
...
...
@@ -2,7 +2,7 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<!-- 填充的颜色 -->
<solid
android:color=
"#
FEF9F5
"
/>
<solid
android:color=
"#
feeddc
"
/>
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners
android:radius=
"10dip"
/>
...
...
video/app/src/main/res/drawable/shape_bg_task_progress.xml
0 → 100644
View file @
4bef18f9
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<!-- 填充的颜色 -->
<solid
android:color=
"#FEF9F5"
/>
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners
android:radius=
"10dip"
/>
</shape>
\ No newline at end of file
video/app/src/main/res/layout/activity_draw_progress.xml
View file @
4bef18f9
...
...
@@ -56,7 +56,7 @@
android:layout_marginTop=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_marginBottom=
"20dp"
android:background=
"@drawable/shape_bg_task"
android:background=
"@drawable/shape_bg_task
_progress
"
android:padding=
"10dp"
>
<ImageView
...
...
video/app/src/main/res/layout/activity_task_award.xml
View file @
4bef18f9
...
...
@@ -14,11 +14,11 @@
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@mipmap/bg_task"
android:orientation=
"vertical"
>
<ImageView
android:layout_marginTop=
"10dp"
android:id=
"@+id/iv_award_quit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
@@ -30,7 +30,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"150dp"
android:layout_marginLeft=
"20dp"
android:layout_marginTop=
"
10
0dp"
android:layout_marginTop=
"
9
0dp"
android:layout_marginRight=
"20dp"
android:background=
"@drawable/shape_bg_task"
android:orientation=
"horizontal"
...
...
video/app/src/main/res/mipmap-xhdpi/ic_draw_quit.png
View replaced file @
2cb786fe
View file @
4bef18f9
2.58 KB
|
W:
|
H:
3.23 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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