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
03b6befb
Commit
03b6befb
authored
Sep 12, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
447910b6
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
731 additions
and
155 deletions
+731
-155
MusicFragment.kt
...ain/java/com/mints/helivideo/ui/fragment/MusicFragment.kt
+74
-38
MyFragment.kt
...c/main/java/com/mints/helivideo/ui/fragment/MyFragment.kt
+52
-48
RedpkgFragment.kt
...in/java/com/mints/helivideo/ui/fragment/RedpkgFragment.kt
+4
-0
DrawCashDialog.kt
...va/com/mints/helivideo/ui/fragment/draw/DrawCashDialog.kt
+126
-0
DrawCashFragment.kt
.../com/mints/helivideo/ui/fragment/draw/DrawCashFragment.kt
+57
-0
DrawPageAdapter.kt
...a/com/mints/helivideo/ui/fragment/draw/DrawPageAdapter.kt
+39
-0
BaseBottomSheetDialog.kt
...helivideo/ui/widgets/bottomsheet/BaseBottomSheetDialog.kt
+38
-0
dialog_drawcash.xml
video/app/src/main/res/layout/dialog_drawcash.xml
+27
-0
fragment_draw.xml
video/app/src/main/res/layout/fragment_draw.xml
+81
-0
fragment_main_my.xml
video/app/src/main/res/layout/fragment_main_my.xml
+194
-69
item_draw_tab.xml
video/app/src/main/res/layout/item_draw_tab.xml
+26
-0
styles.xml
video/app/src/main/res/values/styles.xml
+13
-0
No files found.
video/app/src/main/java/com/mints/helivideo/ui/fragment/MusicFragment.kt
View file @
03b6befb
...
@@ -33,11 +33,11 @@ class MusicFragment : LazyLoadBaseFragment() {
...
@@ -33,11 +33,11 @@ class MusicFragment : LazyLoadBaseFragment() {
if
(
DPSdk
.
isStartSuccess
())
{
if
(
DPSdk
.
isStartSuccess
())
{
//初始化draw组件
//初始化draw组件
initDrawWidget
()
initDrawWidget
()
mDrawFragment
=
mIDPWidget
?.
getFragment
()
mDrawFragment
=
mIDPWidget
?.
fragment
getSupportFragmentManager
()
.
beginTransaction
()
supportFragmentManager
.
beginTransaction
()
.
replace
(
R
.
id
.
draw_style1_frame
,
mDrawFragment
!!
)
.
replace
(
R
.
id
.
draw_style1_frame
,
mDrawFragment
!!
)
.
commitAllowingStateLoss
();
.
commitAllowingStateLoss
()
}
}
}
}
...
@@ -78,13 +78,15 @@ class MusicFragment : LazyLoadBaseFragment() {
...
@@ -78,13 +78,15 @@ class MusicFragment : LazyLoadBaseFragment() {
.
hideClose
(
true
,
null
)
.
hideClose
(
true
,
null
)
.
listener
(
object
:
IDPDrawListener
()
{
.
listener
(
object
:
IDPDrawListener
()
{
override
fun
onDPRefreshFinish
()
{
override
fun
onDPRefreshFinish
()
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPRefreshFinish"
"onDPRefreshFinish"
)
)
}
}
override
fun
onDPPageChange
(
position
:
Int
)
{
override
fun
onDPPageChange
(
position
:
Int
)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPPageChange: $position"
"onDPPageChange: $position"
)
)
}
}
...
@@ -94,7 +96,8 @@ class MusicFragment : LazyLoadBaseFragment() {
...
@@ -94,7 +96,8 @@ class MusicFragment : LazyLoadBaseFragment() {
return
return
}
}
mPos
=
position
mPos
=
position
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPPageChange: $position, map = $map"
"onDPPageChange: $position, map = $map"
)
)
}
}
...
@@ -102,7 +105,8 @@ class MusicFragment : LazyLoadBaseFragment() {
...
@@ -102,7 +105,8 @@ class MusicFragment : LazyLoadBaseFragment() {
override
fun
onCreateQuizView
(
container
:
ViewGroup
):
View
{
override
fun
onCreateQuizView
(
container
:
ViewGroup
):
View
{
val
quizView
:
View
=
LayoutInflater
.
from
(
container
.
context
)
val
quizView
:
View
=
LayoutInflater
.
from
(
container
.
context
)
.
inflate
(
R
.
layout
.
media_layout_quiz
,
container
,
false
)
.
inflate
(
R
.
layout
.
media_layout_quiz
,
container
,
false
)
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onCreateQuizView"
"onCreateQuizView"
)
)
return
quizView
return
quizView
...
@@ -158,49 +162,57 @@ class MusicFragment : LazyLoadBaseFragment() {
...
@@ -158,49 +162,57 @@ class MusicFragment : LazyLoadBaseFragment() {
}
}
override
fun
onDPVideoPlay
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPVideoPlay
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPVideoPlay map = $map"
"onDPVideoPlay map = $map"
)
)
}
}
override
fun
onDPVideoOver
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPVideoOver
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPVideoOver map = $map"
"onDPVideoOver map = $map"
)
)
}
}
override
fun
onDPVideoCompletion
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPVideoCompletion
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPVideoCompletion map = $map"
"onDPVideoCompletion map = $map"
)
)
}
}
override
fun
onDPClose
()
{
override
fun
onDPClose
()
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPClose"
"onDPClose"
)
)
}
}
override
fun
onDPReportResult
(
isSucceed
:
Boolean
)
{
override
fun
onDPReportResult
(
isSucceed
:
Boolean
)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPReportResult isSucceed = $isSucceed"
"onDPReportResult isSucceed = $isSucceed"
)
)
}
}
override
fun
onDPPageStateChanged
(
pageState
:
DPPageState
)
{
override
fun
onDPPageStateChanged
(
pageState
:
DPPageState
)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPPageStateChanged pageState = $pageState"
"onDPPageStateChanged pageState = $pageState"
)
)
}
}
override
fun
onDPReportResult
(
isSucceed
:
Boolean
,
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPReportResult
(
isSucceed
:
Boolean
,
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPReportResult isSucceed = $isSucceed, map = $map"
"onDPReportResult isSucceed = $isSucceed, map = $map"
)
)
}
}
override
fun
onDPRequestStart
(
@Nullable
map
:
Map
<
String
,
Any
>?)
{
override
fun
onDPRequestStart
(
@Nullable
map
:
Map
<
String
,
Any
>?)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPRequestStart"
"onDPRequestStart"
)
)
}
}
...
@@ -210,7 +222,8 @@ class MusicFragment : LazyLoadBaseFragment() {
...
@@ -210,7 +222,8 @@ class MusicFragment : LazyLoadBaseFragment() {
return
return
}
}
for
(
i
in
list
.
indices
)
{
for
(
i
in
list
.
indices
)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPRequestSuccess i = "
+
i
+
", map = "
+
list
[
i
].
toString
()
"onDPRequestSuccess i = "
+
i
+
", map = "
+
list
[
i
].
toString
()
)
)
}
}
...
@@ -222,114 +235,137 @@ class MusicFragment : LazyLoadBaseFragment() {
...
@@ -222,114 +235,137 @@ class MusicFragment : LazyLoadBaseFragment() {
@Nullable
map
:
Map
<
String
,
Any
>?
@Nullable
map
:
Map
<
String
,
Any
>?
)
{
)
{
if
(
map
==
null
)
{
if
(
map
==
null
)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPRequestFail code = $code, msg = $msg"
"onDPRequestFail code = $code, msg = $msg"
)
)
return
return
}
}
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPRequestFail code = $code, msg = $msg, map = $map"
"onDPRequestFail code = $code, msg = $msg, map = $map"
)
)
}
}
override
fun
onDPClickAuthorName
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPClickAuthorName
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPClickAuthorName map = $map"
"onDPClickAuthorName map = $map"
)
)
}
}
override
fun
onDPClickAvatar
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPClickAvatar
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPClickAvatar map = $map"
"onDPClickAvatar map = $map"
)
)
}
}
override
fun
onDPClickComment
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPClickComment
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPClickComment map = $map"
"onDPClickComment map = $map"
)
)
}
}
override
fun
onDPClickLike
(
isLike
:
Boolean
,
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPClickLike
(
isLike
:
Boolean
,
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPClickLike isLike = $isLike, map = $map"
"onDPClickLike isLike = $isLike, map = $map"
)
)
}
}
override
fun
onDPVideoPause
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPVideoPause
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPVideoPause map = $map"
"onDPVideoPause map = $map"
)
)
}
}
override
fun
onDPVideoContinue
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPVideoContinue
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPVideoContinue map = $map"
"onDPVideoContinue map = $map"
)
)
}
}
override
fun
onDPClickShare
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPClickShare
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPClickShare map = $map"
"onDPClickShare map = $map"
)
)
}
}
}).
adListener
(
object
:
IDPAdListener
()
{
}).
adListener
(
object
:
IDPAdListener
()
{
override
fun
onDPAdRequest
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPAdRequest
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPAdRequest map = $map"
"onDPAdRequest map = $map"
)
)
}
}
override
fun
onDPAdRequestSuccess
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPAdRequestSuccess
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPAdRequestSuccess map = $map"
"onDPAdRequestSuccess map = $map"
)
)
}
}
override
fun
onDPAdRequestFail
(
code
:
Int
,
msg
:
String
,
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPAdRequestFail
(
LogUtil
.
d
(
TAG
,
code
:
Int
,
msg
:
String
,
map
:
Map
<
String
,
Any
>
)
{
LogUtil
.
d
(
TAG
,
"onDPAdRequestFail map = $map"
"onDPAdRequestFail map = $map"
)
)
}
}
override
fun
onDPAdFillFail
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPAdFillFail
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPAdFillFail map = $map"
"onDPAdFillFail map = $map"
)
)
}
}
override
fun
onDPAdShow
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPAdShow
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPAdShow map = $map"
"onDPAdShow map = $map"
)
)
}
}
override
fun
onDPAdPlayStart
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPAdPlayStart
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPAdPlayStart map = $map"
"onDPAdPlayStart map = $map"
)
)
}
}
override
fun
onDPAdPlayPause
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPAdPlayPause
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPAdPlayPause map = $map"
"onDPAdPlayPause map = $map"
)
)
}
}
override
fun
onDPAdPlayContinue
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPAdPlayContinue
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPAdPlayContinue map = $map"
"onDPAdPlayContinue map = $map"
)
)
}
}
override
fun
onDPAdPlayComplete
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPAdPlayComplete
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPAdPlayComplete map = $map"
"onDPAdPlayComplete map = $map"
)
)
}
}
override
fun
onDPAdClicked
(
map
:
Map
<
String
,
Any
>)
{
override
fun
onDPAdClicked
(
map
:
Map
<
String
,
Any
>)
{
LogUtil
.
d
(
TAG
,
LogUtil
.
d
(
TAG
,
"onDPAdClicked map = $map"
"onDPAdClicked map = $map"
)
)
}
}
...
...
video/app/src/main/java/com/mints/helivideo/ui/fragment/MyFragment.kt
View file @
03b6befb
...
@@ -9,8 +9,11 @@ import com.mints.helivideo.manager.UserManager
...
@@ -9,8 +9,11 @@ import com.mints.helivideo.manager.UserManager
import
com.mints.helivideo.mvp.model.UserBean
import
com.mints.helivideo.mvp.model.UserBean
import
com.mints.helivideo.mvp.presenters.MyPresenter
import
com.mints.helivideo.mvp.presenters.MyPresenter
import
com.mints.helivideo.mvp.views.MyView
import
com.mints.helivideo.mvp.views.MyView
import
com.mints.helivideo.ui.activitys.SettingsActivity
import
com.mints.helivideo.ui.adapter.TasksAdapter
import
com.mints.helivideo.ui.adapter.TasksAdapter
import
com.mints.helivideo.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.helivideo.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.helivideo.ui.fragment.draw.DrawCashDialog
import
com.mints.helivideo.utils.SpanUtils
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.mints.library.utils.nodoubleclick.AntiShake
import
kotlinx.android.synthetic.main.fragment_main_my.*
import
kotlinx.android.synthetic.main.fragment_main_my.*
...
@@ -25,6 +28,8 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
...
@@ -25,6 +28,8 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
private
val
userManager
by
lazy
{
UserManager
.
getInstance
()
}
private
val
userManager
by
lazy
{
UserManager
.
getInstance
()
}
private
var
tasksAdapter
:
TasksAdapter
?
=
null
private
var
tasksAdapter
:
TasksAdapter
?
=
null
private
var
drawCashDialog
:
DrawCashDialog
?
=
null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_my
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_my
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
...
@@ -68,11 +73,18 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
...
@@ -68,11 +73,18 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
override
fun
onClick
(
v
:
View
?)
{
override
fun
onClick
(
v
:
View
?)
{
if
(
AntiShake
.
check
(
v
?.
id
))
return
if
(
AntiShake
.
check
(
v
?.
id
))
return
when
(
v
?.
id
)
{
// when (v?.id) {
R
.
id
.
civ_my
->
{
// 跳转设置页
// R.id.tv_my_btn -> {
readyGo
(
SettingsActivity
::
class
.
java
)
// }
}
// }
R
.
id
.
btn_my_draw
->
{
// 提现
showDrawCashDialog
()
}
R
.
id
.
btn_task
->
{
// 任务,领金元宝
}
R
.
id
.
tv_my_explain
->
{
// 收益说明
}
}
}
}
override
fun
getUserSuc
(
data
:
UserBean
)
{
override
fun
getUserSuc
(
data
:
UserBean
)
{
...
@@ -80,52 +92,44 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
...
@@ -80,52 +92,44 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
}
}
private
fun
loginStatus
(
consumer
:
UserBean
)
{
private
fun
loginStatus
(
consumer
:
UserBean
)
{
// // 1-匹配用户
// if (consumer.activiteFlag == 1) {
// // 匹配
// ll_my_vip.visibility = View.VISIBLE
// ll_my_payrecord.visibility = View.VISIBLE
// ll_contactus.visibility = View.VISIBLE
// line_my_payrecord.visibility = View.VISIBLE
// line_my_contactus.visibility = View.VISIBLE
// } else {
// // 未匹配
// ll_my_vip.visibility = View.GONE
// ll_my_payrecord.visibility = View.GONE
// ll_contactus.visibility = View.GONE
// line_my_payrecord.visibility = View.GONE
// line_my_contactus.visibility = View.GONE
// }
//
// // 2-是否有手机号
// if (!TextUtils.isEmpty(userManager.mobile)) {
// tv_my_account.text = "手机号:" + consumer.mobile.substring(0,3)+"****"+consumer.mobile.substring(consumer.mobile.length-4)
// iv_my_bind.visibility = View.GONE
// } else {
// tv_my_account.text = "绑定手机号"
// iv_my_bind.visibility = View.VISIBLE
// }
// tv_my_id.text = "用户ID:"+consumer.idcode
//
// // 3-vip
// if (consumer.expireTime > 0) {
// tv_my_vip.text = "VIP会员"
// tv_my_btn.visibility = View.GONE
// if (consumer.isForever) {
// tv_my_status.text = "有效期: 永久有效"
// } else {
// tv_my_status.text =
// "到期时间 ${TimeRender.formatDate(consumer.expireTime, TimeRender.ALL_FORMAT_LINE)}"
// }
// } else {
// tv_my_vip.text = "开通VIP会员"
// tv_my_status.text = "解锁全部短剧"
// tv_my_btn.visibility = View.VISIBLE
// tv_my_btn.text = "立即开通"
// }
}
}
private
fun
initListener
()
{
private
fun
initListener
()
{
btn_my_draw
.
setOnClickListener
(
this
)
btn_task
.
setOnClickListener
(
this
)
tv_my_explain
.
setOnClickListener
(
this
)
civ_my
.
setOnClickListener
(
this
)
rg_my_income
.
setOnCheckedChangeListener
{
group
,
checkedId
->
if
(
checkedId
==
R
.
id
.
rb_my_cash
)
{
tv_my_title
.
text
=
"红包余额(元)"
tv_my_money
.
text
=
SpanUtils
()
.
setFontSize
(
30
,
true
)
.
append
(
" "
)
.
setFontSize
(
14
,
true
)
.
append
(
" ≈ "
)
.
create
()
}
else
{
tv_my_title
.
text
=
"金元宝余额(个)"
tv_my_money
.
text
=
SpanUtils
()
.
setFontSize
(
30
,
true
)
.
append
(
" "
)
.
setFontSize
(
14
,
true
)
.
append
(
" ≈ "
)
.
create
()
}
}
}
private
fun
showDrawCashDialog
()
{
drawCashDialog
=
DrawCashDialog
()
drawCashDialog
?.
let
{
if
(!
it
.
isAdded
&&
!
it
.
isVisible
&&
!
it
.
isRemoving
)
{
it
.
show
(
supportFragmentManager
,
this
.
javaClass
.
simpleName
)
}
else
{
supportFragmentManager
.
beginTransaction
().
show
(
it
)
}
}
}
}
}
}
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/ui/fragment/RedpkgFragment.kt
View file @
03b6befb
...
@@ -8,6 +8,10 @@ class RedpkgFragment : LazyLoadBaseFragment() {
...
@@ -8,6 +8,10 @@ class RedpkgFragment : LazyLoadBaseFragment() {
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_redpkg
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_redpkg
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
}
}
}
}
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/ui/fragment/draw/DrawCashDialog.kt
0 → 100644
View file @
03b6befb
package
com.mints.helivideo.ui.fragment.draw
import
android.graphics.Typeface
import
android.os.Bundle
import
android.util.TypedValue
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.TextView
import
androidx.core.content.ContextCompat
import
androidx.recyclerview.widget.RecyclerView
import
androidx.viewpager2.widget.ViewPager2
import
com.google.android.material.tabs.TabLayout
import
com.google.android.material.tabs.TabLayout.OnTabSelectedListener
import
com.google.android.material.tabs.TabLayoutMediator
import
com.mints.helivideo.R
import
com.mints.helivideo.ui.widgets.bottomsheet.BaseBottomSheetDialog
/**
*
* @desc 提现弹框
*/
class
DrawCashDialog
:
BaseBottomSheetDialog
()
{
private
lateinit
var
tabLayout
:
TabLayout
private
lateinit
var
vp2
:
ViewPager2
private
val
tabsData
=
mutableListOf
<
Int
>()
private
var
vpAdapter
:
DrawPageAdapter
?
=
null
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
?
{
val
rootView
=
inflater
.
inflate
(
R
.
layout
.
dialog_drawcash
,
container
)
initView
(
rootView
)
return
rootView
}
private
fun
initView
(
rootView
:
View
)
{
tabsData
.
add
(
DrawCashFragment
.
DRAW_TYPE_CASH
)
tabsData
.
add
(
DrawCashFragment
.
DRAW_TYPE_GOLD
)
tabLayout
=
rootView
.
findViewById
(
R
.
id
.
tab_draw
)
vp2
=
rootView
.
findViewById
(
R
.
id
.
vp2_draw
)
vpAdapter
=
DrawPageAdapter
(
tabsData
,
this
)
vp2
.
adapter
=
vpAdapter
// 处理嵌套滑动冲突
(
vp2
.
getChildAt
(
0
)
as
RecyclerView
).
isNestedScrollingEnabled
=
false
TabLayoutMediator
(
tabLayout
,
vp2
)
{
tab
,
position
->
// 初始化Tab
tab
.
id
=
position
if
(
tabsData
.
size
>
0
)
{
tab
.
customView
=
getTabView
(
tabsData
[
position
])
}
}.
attach
()
tabLayout
.
addOnTabSelectedListener
(
object
:
OnTabSelectedListener
{
override
fun
onTabSelected
(
tab
:
TabLayout
.
Tab
?)
{
updateTab
(
tab
,
true
)
}
override
fun
onTabUnselected
(
tab
:
TabLayout
.
Tab
?)
{
updateTab
(
tab
,
false
)
}
override
fun
onTabReselected
(
tab
:
TabLayout
.
Tab
?)
{
}
})
}
private
fun
updateTab
(
tab
:
TabLayout
.
Tab
?,
isSelected
:
Boolean
)
{
tab
?.
customView
?.
let
{
val
text
=
it
.
findViewById
<
TextView
>(
R
.
id
.
item_tv
)
val
indicator
=
it
.
findViewById
<
View
>(
R
.
id
.
item_indicator
)
if
(
isSelected
)
{
indicator
.
visibility
=
View
.
VISIBLE
text
.
typeface
=
Typeface
.
defaultFromStyle
(
Typeface
.
BOLD
)
text
.
setTextSize
(
TypedValue
.
COMPLEX_UNIT_SP
,
18f
)
text
.
setTextColor
(
ContextCompat
.
getColor
(
requireContext
(),
R
.
color
.
black_text
))
}
else
{
indicator
.
visibility
=
View
.
INVISIBLE
text
.
typeface
=
Typeface
.
defaultFromStyle
(
Typeface
.
NORMAL
)
text
.
setTextSize
(
TypedValue
.
COMPLEX_UNIT_SP
,
16f
)
text
.
setTextColor
(
ContextCompat
.
getColor
(
requireContext
(),
R
.
color
.
color_8D8F90
))
}
}
}
private
fun
getTabView
(
type
:
Int
):
View
{
val
view
=
LayoutInflater
.
from
(
requireContext
()).
inflate
(
R
.
layout
.
item_draw_tab
,
null
)
if
(
type
==
DrawCashFragment
.
DRAW_TYPE_CASH
)
{
view
.
findViewById
<
View
>(
R
.
id
.
item_indicator
).
visibility
=
View
.
VISIBLE
view
.
findViewById
<
TextView
>(
R
.
id
.
item_tv
).
text
=
"红包提现"
}
else
{
view
.
findViewById
<
View
>(
R
.
id
.
item_indicator
).
visibility
=
View
.
INVISIBLE
view
.
findViewById
<
TextView
>(
R
.
id
.
item_tv
).
text
=
"金元宝提现"
}
return
view
}
// 提现
private
fun
drawCash
()
{
// if (rbWechat.isChecked) wechatDrawCash()
// else alipayDrawCash()
}
// 微信提现
private
fun
wechatDrawCash
()
{
}
// 支付宝提现
private
fun
alipayDrawCash
()
{
}
}
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/ui/fragment/draw/DrawCashFragment.kt
0 → 100644
View file @
03b6befb
package
com.mints.helivideo.ui.fragment.draw
import
android.os.Bundle
import
androidx.fragment.app.Fragment
import
com.mints.helivideo.R
import
com.mints.helivideo.ui.fragment.base.BaseFragment
import
com.mints.helivideo.utils.SpanUtils
import
kotlinx.android.synthetic.main.fragment_draw.*
class
DrawCashFragment
:
BaseFragment
()
{
companion
object
{
const
val
DRAW_TYPE
=
"DRAW_TYPE"
const
val
DRAW_TYPE_CASH
=
0
x001
const
val
DRAW_TYPE_GOLD
=
0
x002
fun
newInstance
(
type
:
Int
):
Fragment
{
val
args
=
Bundle
()
args
.
putInt
(
DRAW_TYPE
,
type
)
val
fragment
=
DrawCashFragment
()
fragment
.
arguments
=
args
return
fragment
}
}
private
var
drawType
=
DRAW_TYPE_CASH
override
fun
initViewsAndEvents
()
{
arguments
?.
let
{
drawType
=
it
.
getInt
(
DRAW_TYPE
,
DRAW_TYPE_CASH
)
}
if
(
drawType
==
DRAW_TYPE_CASH
)
{
tv_title
.
text
=
"红包余额(元)"
tv_cash
.
text
=
SpanUtils
()
.
append
(
"90.00"
)
.
setFontSize
(
30
,
true
)
.
append
(
"≈ 900000个"
)
.
setFontSize
(
16
,
true
)
.
create
()
}
else
{
tv_title
.
text
=
"金元宝余额(个)"
tv_cash
.
text
=
SpanUtils
()
.
append
(
"90.00"
)
.
setFontSize
(
30
,
true
)
.
append
(
"≈ 0.00元"
)
.
setFontSize
(
16
,
true
)
.
create
()
}
}
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_draw
}
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/ui/fragment/draw/DrawPageAdapter.kt
0 → 100644
View file @
03b6befb
package
com.mints.helivideo.ui.fragment.draw
import
androidx.fragment.app.Fragment
import
androidx.viewpager2.adapter.FragmentStateAdapter
class
DrawPageAdapter
(
private
val
data
:
List
<
Int
>,
fragment
:
Fragment
)
:
FragmentStateAdapter
(
fragment
)
{
private
val
fragments
=
mutableMapOf
<
Int
,
Fragment
>()
override
fun
getItemId
(
position
:
Int
):
Long
{
return
data
[
position
].
toLong
()
}
override
fun
getItemCount
()
=
data
.
size
override
fun
createFragment
(
position
:
Int
):
Fragment
{
val
newFragment
=
DrawCashFragment
.
newInstance
(
data
[
position
])
fragments
[
position
]
=
newFragment
return
newFragment
}
override
fun
containsItem
(
itemId
:
Long
):
Boolean
{
data
.
forEach
{
if
(
it
.
toLong
()
==
itemId
)
{
return
true
}
}
return
false
}
fun
getFragments
():
MutableMap
<
Int
,
Fragment
>
{
return
fragments
}
}
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/ui/widgets/bottomsheet/BaseBottomSheetDialog.kt
0 → 100644
View file @
03b6befb
package
com.mints.helivideo.ui.widgets.bottomsheet
import
android.widget.FrameLayout
import
androidx.coordinatorlayout.widget.CoordinatorLayout
import
com.google.android.material.bottomsheet.BottomSheetBehavior
import
com.google.android.material.bottomsheet.BottomSheetDialog
import
com.google.android.material.bottomsheet.BottomSheetDialogFragment
import
com.mints.helivideo.R
open
class
BaseBottomSheetDialog
:
BottomSheetDialogFragment
()
{
private
var
bottomSheet
:
FrameLayout
?
=
null
private
var
behavior
:
BottomSheetBehavior
<
FrameLayout
>?
=
null
override
fun
onStart
()
{
super
.
onStart
()
val
dialog
=
dialog
as
BottomSheetDialog
?
bottomSheet
=
dialog
!!
.
delegate
.
findViewById
(
com
.
google
.
android
.
material
.
R
.
id
.
design_bottom_sheet
)
if
(
bottomSheet
!=
null
)
{
val
layoutParams
=
bottomSheet
!!
.
layoutParams
as
CoordinatorLayout
.
LayoutParams
layoutParams
.
height
=
CoordinatorLayout
.
LayoutParams
.
WRAP_CONTENT
bottomSheet
!!
.
layoutParams
=
layoutParams
behavior
=
BottomSheetBehavior
.
from
(
bottomSheet
!!
)
behavior
!!
.
peekHeight
=
getHeight
()
// 初始为展开状态
behavior
!!
.
state
=
BottomSheetBehavior
.
STATE_EXPANDED
}
}
override
fun
getTheme
():
Int
{
return
R
.
style
.
BottomDialog
}
protected
open
fun
getHeight
():
Int
{
return
resources
.
displayMetrics
.
heightPixels
}
}
\ No newline at end of file
video/app/src/main/res/layout/dialog_drawcash.xml
0 → 100644
View file @
03b6befb
<?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=
"wrap_content"
android:background=
"@drawable/shape_tab_friends"
android:orientation=
"vertical"
android:padding=
"@dimen/dp_10"
>
<com.google.android.material.tabs.TabLayout
android:id=
"@+id/tab_draw"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
app:tabBackground=
"@null"
app:tabIndicatorColor=
"@color/color_F61F03"
app:tabIndicatorHeight=
"0dp"
app:tabMode=
"fixed"
app:tabRippleColor=
"@null"
app:tabSelectedTextColor=
"@color/black"
app:tabTextColor=
"@color/gray"
/>
<androidx.viewpager2.widget.ViewPager2
android:id=
"@+id/vp2_draw"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
\ No newline at end of file
video/app/src/main/res/layout/fragment_draw.xml
0 → 100644
View file @
03b6befb
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:padding=
"16dp"
>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"红包余额(元)"
/>
<TextView
android:id=
"@+id/tv_cash"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:text=
"90.00 ≈ 900000个"
android:textColor=
"@color/black"
android:textSize=
"20sp"
/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/ry_draw"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/dp_10"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"10dp"
android:text=
"提现方式"
android:textColor=
"@color/black"
/>
<RadioGroup
android:id=
"@+id/rg_draw"
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:layout_marginTop=
"10dp"
android:orientation=
"horizontal"
android:padding=
"10dp"
>
<RadioButton
android:id=
"@+id/rb_wechat"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:button=
"@null"
android:gravity=
"center"
android:text=
"微信"
/>
<RadioButton
android:id=
"@+id/rb_alipay"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:button=
"@null"
android:gravity=
"center"
android:text=
"支付宝"
/>
</RadioGroup>
<Button
android:id=
"@+id/btn_draw"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginEnd=
"@dimen/dp_10"
android:text=
"去提现"
/>
</LinearLayout>
\ No newline at end of file
video/app/src/main/res/layout/fragment_main_my.xml
View file @
03b6befb
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android=
"http://schemas.android.com/apk/res/android"
<ScrollView
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical
"
>
android:clipChildren=
"false
"
>
<Frame
Layout
<Linear
Layout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_par
ent"
android:layout_height=
"wrap_cont
ent"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"220dp
"
android:layout_height=
"wrap_content
"
android:background=
"@mipmap/bg_my"
android:background=
"@mipmap/bg_my"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<Linear
Layout
<androidx.constraintlayout.widget.Constraint
Layout
android:id=
"@+id/ll_my_login
"
android:id=
"@+id/ll_my_info
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"56dp"
android:layout_marginTop=
"50dp"
>
android:orientation=
"horizontal"
>
<com.mints.helivideo.ui.widgets.CircleImageView
<com.mints.helivideo.ui.widgets.CircleImageView
android:id=
"@+id/civ_my"
android:id=
"@+id/civ_my"
android:layout_width=
"7
0dp"
android:layout_width=
"6
0dp"
android:layout_height=
"7
0dp"
android:layout_height=
"6
0dp"
android:layout_marginStart=
"20dp"
android:layout_marginStart=
"20dp"
android:src=
"@mipmap/ic_my_avat"
/>
android:src=
"@mipmap/ic_my_avat"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<LinearLayout
<TextView
android:id=
"@+id/tv_my_name"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"10dp"
android:orientation=
"vertical"
>
android:layout_toEndOf=
"@id/civ_my"
android:text=
"昵称:游客"
android:textColor=
"@color/black_text"
android:textSize=
"16sp"
app:layout_constraintBottom_toTopOf=
"@id/tv_my_id"
app:layout_constraintStart_toEndOf=
"@id/civ_my"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
<TextView
android:id=
"@+id/tv_my_id"
android:id=
"@+id/tv_my_id"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"10dp"
android:layout_marginStart=
"10dp"
android:text=
"用户ID:"
android:text=
"用户ID:"
android:textColor=
"@color/black_text"
android:textColor=
"@color/black_text"
android:textSize=
"16sp"
/>
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/civ_my"
app:layout_constraintTop_toBottomOf=
"@id/tv_my_name"
/>
<LinearLayout
<TextView
android:id=
"@+id/tv_my_explain"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"6dp"
android:paddingStart=
"@dimen/dp_10"
android:paddingTop=
"6dp"
android:paddingEnd=
"@dimen/dp_10"
android:paddingBottom=
"6dp"
android:text=
"收益说明"
android:textColor=
"@color/white"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<RadioGroup
android:id=
"@+id/rg_my_income"
android:layout_width=
"match_parent"
android:layout_height=
"70dp"
android:layout_marginTop=
"20dp"
android:background=
"@color/red"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<RadioButton
android:id=
"@+id/rb_my_cash"
android:layout_width=
"0dp"
android:layout_height=
"50dp"
android:layout_gravity=
"bottom"
android:layout_weight=
"1"
android:background=
"@mipmap/ic_launcher_main"
android:button=
"@null"
android:gravity=
"center"
android:text=
"红包券收益"
/>
<RadioButton
android:id=
"@+id/rb_my_gold"
android:layout_width=
"0dp"
android:layout_height=
"50dp"
android:layout_gravity=
"bottom"
android:layout_weight=
"1"
android:button=
"@null"
android:gravity=
"center"
android:text=
"金元宝收益"
/>
</RadioGroup>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"100dp"
android:layout_margin=
"@dimen/dp_10"
android:padding=
"@dimen/dp_10"
>
<TextView
<TextView
android:id=
"@+id/tv_my_account
"
android:id=
"@+id/tv_my_title
"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:text=
"红包余额(元)"
android:layout_marginStart=
"10dp"
app:layout_constraintStart_toStartOf=
"parent"
android:text=
"绑定手机号"
app:layout_constraintTop_toTopOf=
"parent"
/>
android:textColor=
"#000000"
android:textSize=
"18sp"
<TextView
android:textStyle=
"bold"
/>
android:id=
"@+id/tv_my_money"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_my_title"
/>
<Button
android:id=
"@+id/btn_my_draw"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"提现"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/dp_10"
android:padding=
"@dimen/dp_10"
>
<ImageView
<ImageView
android:id=
"@+id/iv_my_bind"
android:id=
"@+id/iv_task_icon"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:src=
"@mipmap/ic_launcher_main"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_task_title"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"@dimen/dp_10"
android:layout_marginLeft=
"10dp"
android:text=
"观看视频得金元宝"
android:src=
"@mipmap/ic_my_bind"
></ImageView>
android:textColor=
"@color/black_text"
</LinearLayout>
android:textSize=
"16sp"
</LinearLayout>
app:layout_constraintStart_toEndOf=
"@id/iv_task_icon"
app:layout_constraintTop_toTopOf=
"parent"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_task_label"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_10"
android:text=
"无门槛秒到账"
app:layout_constraintStart_toEndOf=
"@id/iv_task_icon"
app:layout_constraintTop_toBottomOf=
"@id/tv_task_title"
/>
<ProgressBar
android:id=
"@+id/pb_task"
style=
"@android:style/Widget.ProgressBar.Horizontal"
android:layout_width=
"150dp"
android:layout_height=
"10dp"
android:layout_marginStart=
"@dimen/dp_10"
android:progressDrawable=
"@drawable/progressbar_versus_changevedio_bg"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/iv_task_icon"
app:layout_constraintTop_toBottomOf=
"@id/tv_task_label"
/>
<Button
android:id=
"@+id/btn_task"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"领金元宝"
app:layout_constraintBottom_toTopOf=
"@id/tv_task_count"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_task_count"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"今日剩余10次"
android:textSize=
"12sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@id/btn_task"
app:layout_constraintStart_toStartOf=
"@id/btn_task"
app:layout_constraintTop_toBottomOf=
"@id/btn_task"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</
Frame
Layout>
</
Linear
Layout>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/recy_tasks"
android:id=
"@+id/recy_tasks"
...
...
video/app/src/main/res/layout/item_draw_tab.xml
0 → 100644
View file @
03b6befb
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/item_tv"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingTop=
"6dp"
android:paddingBottom=
"6dp"
android:textColor=
"@color/color_8D8F90"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<View
android:id=
"@+id/item_indicator"
android:layout_width=
"30dp"
android:layout_height=
"2dp"
android:background=
"@color/red"
android:visibility=
"invisible"
/>
</LinearLayout>
\ No newline at end of file
video/app/src/main/res/values/styles.xml
View file @
03b6befb
...
@@ -77,5 +77,18 @@
...
@@ -77,5 +77,18 @@
<item
name=
"android:button"
>
@drawable/checkbox_style
</item>
<item
name=
"android:button"
>
@drawable/checkbox_style
</item>
</style>
</style>
<style
name=
"BottomDialog"
parent=
"@android:style/Theme.Dialog"
>
<item
name=
"android:windowTitleStyle"
>
@null
</item>
<item
name=
"android:windowBackground"
>
@android:color/transparent
</item>
<item
name=
"android:colorBackgroundCacheHint"
>
@null
</item>
<item
name=
"android:windowAnimationStyle"
>
@style/BottomDialog.AnimationStyle
</item>
<item
name=
"android:windowSoftInputMode"
>
stateUnspecified|adjustPan
</item>
</style>
<style
name=
"BottomDialog.AnimationStyle"
parent=
"android:Animation"
>
<item
name=
"android:windowEnterAnimation"
>
@anim/push_bottom_in
</item>
<item
name=
"android:windowExitAnimation"
>
@anim/push_bottom_out
</item>
</style>
</resources>
</resources>
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