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
179518ae
Commit
179518ae
authored
Jul 13, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
e286f970
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
52 additions
and
54 deletions
+52
-54
MobileLoginActivity.kt
...com/mints/wisdomclean/ui/activitys/MobileLoginActivity.kt
+4
-3
SettingsActivity.kt
...va/com/mints/wisdomclean/ui/activitys/SettingsActivity.kt
+3
-2
FollowVideoFragment.kt
.../com/mints/wisdomclean/ui/fragment/FollowVideoFragment.kt
+15
-13
RecommendFragment.kt
...va/com/mints/wisdomclean/ui/fragment/RecommendFragment.kt
+6
-15
StickHeaderDecoration.java
...m/mints/wisdomclean/ui/widgets/StickHeaderDecoration.java
+1
-1
VideoEpisodeDialog.kt
...va/com/mints/wisdomclean/ui/widgets/VideoEpisodeDialog.kt
+1
-1
DramaApiDetailActivity.kt
...ava/com/mints/wisdomclean/video/DramaApiDetailActivity.kt
+7
-5
VideoActivity.kt
...rc/main/java/com/mints/wisdomclean/video/VideoActivity.kt
+1
-1
btn_index_submit.xml
video/app/src/main/res/drawable/btn_index_submit.xml
+1
-1
btn_index_submit_unchecked.xml
.../app/src/main/res/drawable/btn_index_submit_unchecked.xml
+1
-1
rb_opinion_selected.xml
video/app/src/main/res/drawable/rb_opinion_selected.xml
+1
-1
activity_aboutus.xml
video/app/src/main/res/layout/activity_aboutus.xml
+2
-2
activity_mobile_login.xml
video/app/src/main/res/layout/activity_mobile_login.xml
+1
-1
activity_video.xml
video/app/src/main/res/layout/activity_video.xml
+1
-1
fragment_main_my.xml
video/app/src/main/res/layout/fragment_main_my.xml
+5
-5
web_header_layout.xml
video/app/src/main/res/layout/web_header_layout.xml
+2
-1
No files found.
video/app/src/main/java/com/mints/wisdomclean/ui/activitys/MobileLoginActivity.kt
View file @
179518ae
...
...
@@ -186,7 +186,7 @@ class MobileLoginActivity : BaseActivity(), LoginView, View.OnClickListener {
}
override
fun
updateDrawState
(
ds
:
TextPaint
)
{
ds
.
color
=
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
color_FF9837
)
ds
.
color
=
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
tv_message_recente_money
)
ds
.
isUnderlineText
=
false
}
})
...
...
@@ -200,7 +200,7 @@ class MobileLoginActivity : BaseActivity(), LoginView, View.OnClickListener {
}
override
fun
updateDrawState
(
ds
:
TextPaint
)
{
ds
.
color
=
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
color_FF9837
)
ds
.
color
=
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
tv_message_recente_money
)
ds
.
isUnderlineText
=
false
}
})
...
...
@@ -251,7 +251,8 @@ class MobileLoginActivity : BaseActivity(), LoginView, View.OnClickListener {
when
(
v
?.
id
)
{
R
.
id
.
dialog_btn_left
->
{
readyGo
(
MainActivity
::
class
.
java
)
val
activity
=
ActivityPageManager
.
getInstance
().
getActivity
(
MainActivity
::
class
.
java
)
val
activity
=
ActivityPageManager
.
getInstance
().
getActivity
(
MainActivity
::
class
.
java
)
if
(
activity
!=
null
&&
activity
is
MainActivity
)
{
activity
.
clickTab3Layout
()
}
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/activitys/SettingsActivity.kt
View file @
179518ae
...
...
@@ -6,6 +6,7 @@ import android.content.Intent
import
android.net.Uri
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
import
android.text.TextUtils
import
android.view.View
import
android.widget.ImageView
...
...
@@ -194,7 +195,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
this
,
SpanUtils
()
.
append
(
"确认注销账户?"
)
.
setForegroundColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
color_FF9837
))
.
setForegroundColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
tv_message_recente_money
))
.
create
(),
"提示"
,
"确定"
,
...
...
@@ -204,7 +205,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
ToastUtil
.
show
(
this
@SettingsActivity
,
"注销账户申请已发起!"
)
Handler
().
postDelayed
({
Handler
(
Looper
.
getMainLooper
()
).
postDelayed
({
finish
()
},
200
)
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/fragment/FollowVideoFragment.kt
View file @
179518ae
...
...
@@ -26,7 +26,7 @@ class FollowVideoFragment : BaseFragment(), FollowView {
private
val
followPresenter
by
lazy
{
FollowPresenter
()
}
private
val
datas
=
arrayListOf
<
VedioBean
>()
lateinit
var
followAdapter
:
FollowAdapter
private
var
followAdapter
:
FollowAdapter
?
=
null
companion
object
{
fun
newInstance
():
Fragment
{
...
...
@@ -59,9 +59,9 @@ class FollowVideoFragment : BaseFragment(), FollowView {
}
rv_follow
.
layoutManager
=
GridLayoutManager
(
requireContext
(),
3
)
followAdapter
=
FollowAdapter
(
requireActivity
())
followAdapter
.
setEmptyView
(
emptyView
)
followAdapter
.
setNewInstance
(
datas
)
followAdapter
.
setOnItemClickListener
{
adapter
,
view
,
position
->
followAdapter
?
.
setEmptyView
(
emptyView
)
followAdapter
?
.
setNewInstance
(
datas
)
followAdapter
?
.
setOnItemClickListener
{
adapter
,
view
,
position
->
LocalVedioManager
.
startVedioDetailActivityForType
(
requireActivity
(),
datas
[
position
]
...
...
@@ -70,7 +70,7 @@ class FollowVideoFragment : BaseFragment(), FollowView {
rv_follow
.
adapter
=
followAdapter
}
fun
getAdapter
():
FollowAdapter
{
fun
getAdapter
():
FollowAdapter
?
{
return
followAdapter
}
...
...
@@ -91,11 +91,11 @@ class FollowVideoFragment : BaseFragment(), FollowView {
datas
.
clear
()
if
(
bannerList
.
list
.
isNotEmpty
())
{
datas
.
addAll
(
bannerList
.
list
)
followAdapter
.
setNewInstance
(
datas
)
followAdapter
?
.
setNewInstance
(
datas
)
}
showEditView
(
true
)
followAdapter
.
setEditStyle
(
false
)
followAdapter
.
notifyDataSetChanged
()
followAdapter
?
.
setEditStyle
(
false
)
followAdapter
?
.
notifyDataSetChanged
()
}
override
fun
getCollectListFail
()
{
...
...
@@ -112,13 +112,15 @@ class FollowVideoFragment : BaseFragment(), FollowView {
}
fun
delete
()
{
val
strArr
=
arrayListOf
<
String
>()
for
(
datum
in
followAdapter
.
data
)
{
if
(
datum
.
isChecked
)
{
strArr
.
add
(
""
+
datum
.
vedioId
)
followAdapter
?.
let
{
val
strArr
=
arrayListOf
<
String
>()
for
(
datum
in
it
.
data
)
{
if
(
datum
.
isChecked
)
{
strArr
.
add
(
""
+
datum
.
vedioId
)
}
}
followPresenter
.
cancelCollect
(
strArr
)
}
followPresenter
.
cancelCollect
(
strArr
)
}
}
\ No newline at end of file
video/app/src/main/java/com/mints/wisdomclean/ui/fragment/RecommendFragment.kt
View file @
179518ae
...
...
@@ -42,10 +42,11 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
private
fun
initVp2
()
{
mCurrentNewFlag
=
UserManager
.
getInstance
().
newFlag
fragments
.
clear
()
tabsData
.
add
(
"追剧"
)
tabsData
.
add
(
"推荐"
)
fragments
.
clear
()
if
(
mCurrentNewFlag
)
{
fragments
.
add
(
FollowVideoFragment
.
newInstance
())
fragments
.
add
(
WatchVideoFragment
.
newInstance
())
...
...
@@ -145,18 +146,8 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_TWO
)
{
if
(
mCurrentNewFlag
!=
UserManager
.
getInstance
().
newFlag
)
{
mCurrentNewFlag
=
UserManager
.
getInstance
().
newFlag
if
(
mCurrentNewFlag
)
{
// 匹配用户自有
fragments
.
clear
()
fragments
.
add
(
FollowVideoFragment
.
newInstance
())
fragments
.
add
(
WatchVideoFragment
.
newInstance
())
}
else
{
// 未匹配用户展示穿山甲
fragments
.
clear
()
fragments
.
add
(
FollowVideoFragment
.
newInstance
())
fragments
.
add
(
DramaTabFragment
())
}
vpAdapter
?.
notifyDataSetChanged
()
// 重置状态
initVp2
()
}
}
}
...
...
@@ -190,7 +181,7 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
tv_edit_text
.
visibility
=
View
.
GONE
}
(
requireActivity
()
as
MainActivity
).
showEdit
(
isEdit
)
(
fragments
[
0
]
as
FollowVideoFragment
).
getAdapter
().
setEditStyle
(
isEdit
)
(
fragments
[
0
]
as
FollowVideoFragment
).
getAdapter
()
?
.
setEditStyle
(
isEdit
)
}
private
fun
changeBottomTabColor
(
showBlack
:
Boolean
)
{
...
...
@@ -209,7 +200,7 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
}
fun
fullChoice
()
{
(
fragments
[
0
]
as
FollowVideoFragment
).
getAdapter
().
fullChoice
()
(
fragments
[
0
]
as
FollowVideoFragment
).
getAdapter
()
?
.
fullChoice
()
}
fun
changeTab
(
index
:
Int
)
{
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/widgets/StickHeaderDecoration.java
View file @
179518ae
...
...
@@ -74,7 +74,7 @@ public class StickHeaderDecoration extends RecyclerView.ItemDecoration {
mTextPaint
.
getTextBounds
(
adapter
.
getGroupName
(
position
),
0
,
adapter
.
getGroupName
(
position
).
length
(),
mTextRect
);
c
.
drawText
(
adapter
.
getGroupName
(
position
),
left
+
mTextPaddingLeft
,
(
view
.
getTop
()
-
mItemHeaderHeight
)
+
mItemHeaderHeight
/
2
+
mTextRect
.
height
()
/
2
,
mTextPaint
);
}
else
{
c
.
drawRect
(
left
,
view
.
getTop
()
-
1
,
right
,
view
.
getTop
(),
mLinePaint
);
//
c.drawRect(left, view.getTop() - 1, right, view.getTop(), mLinePaint);
}
}
}
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/widgets/VideoEpisodeDialog.kt
View file @
179518ae
...
...
@@ -63,7 +63,7 @@ class VideoEpisodeDialog(
findViewById
<
TextView
>(
R
.
id
.
title_tv
).
text
=
vedioBean
?.
title
findViewById
<
TextView
>(
R
.
id
.
label_tv
).
text
=
if
(
vedioBean
?.
completeStatus
==
0
)
"已完结"
else
"
未完结
"
if
(
vedioBean
?.
completeStatus
==
0
)
"已完结"
else
"
更新中
"
initVp
()
}
...
...
video/app/src/main/java/com/mints/wisdomclean/video/DramaApiDetailActivity.kt
View file @
179518ae
...
...
@@ -31,7 +31,6 @@ import com.mints.wisdomclean.ui.adapter.VideoEpisodeAdapter
import
com.mints.wisdomclean.ui.widgets.DialogListener
import
com.mints.wisdomclean.ui.widgets.VideoEpisodeDialog
import
com.mints.wisdomclean.ui.widgets.VipCountDialog
import
com.mints.wisdomclean.utils.LogUtil
import
kotlinx.android.synthetic.main.drama_activity_api_detail.*
import
org.json.JSONObject
...
...
@@ -133,12 +132,15 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
drama
=
outerDrama
drama
?.
let
{
LogUtil
.
d
(
"BBBBB -> "
+
mVedioBean
!!
.
seeIndex
)
it
.
index
=
mVedioBean
!!
.
seeIndex
mInitUnlockIndex
=
mVedioBean
!!
.
unlockIndex
mUnlockIndexMap
[
it
.
id
]
=
mInitUnlockIndex
title_tv
.
text
=
it
.
title
episode_tv
.
text
=
String
.
format
(
"共%d集 已完结"
,
it
.
total
)
if
(
mVedioBean
!!
.
completeStatus
==
0
)
{
episode_tv
.
text
=
String
.
format
(
"共%d集 已完结"
,
it
.
total
)
}
else
{
episode_tv
.
text
=
String
.
format
(
"共%d集 更新中"
,
it
.
total
)
}
info_tv
.
text
=
String
.
format
(
"第%d集"
,
it
.
index
+
1
)
unlock
.
text
=
String
.
format
(
"看广告解锁%d集"
,
lockSet
)
if
(
mVedioBean
!!
.
collect
==
0
)
{
...
...
@@ -285,7 +287,6 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
}
mVedioBean
!!
.
seeIndex
=
position
+
1
LogUtil
.
d
(
"AAAAA -> "
+
mVedioBean
!!
.
seeIndex
+
" - "
+
position
)
LocalVedioManager
.
commitVedio
(
mVedioBean
!!
)
showVipCountDialog
(
position
)
...
...
@@ -409,7 +410,8 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
hasUnlockList
.
add
(
widget
.
currentDramaIndex
+
lockSet
)
mHasUnlockIndexMap
[
drama
.
id
]
=
hasUnlockList
}
mUnlockIndexMap
[
drama
.
id
]
=
mUnlockIndexMap
[
drama
.
id
]
!!
+
lockSet
mUnlockIndexMap
[
drama
.
id
]
=
mUnlockIndexMap
[
drama
.
id
]
!!
+
lockSet
blockView
?.
visibility
=
View
.
GONE
callback
?.
onDramaRewardArrived
()
// 解锁当前集
...
...
video/app/src/main/java/com/mints/wisdomclean/video/VideoActivity.kt
View file @
179518ae
...
...
@@ -91,7 +91,7 @@ class VideoActivity : BaseActivity(), View.OnClickListener, VideoView,
fun
initView
()
{
mVedioBean
?.
let
{
episode_tv
.
text
=
"共"
+
it
.
vedioTotal
+
"集"
+
if
(
it
.
completeStatus
==
0
)
"已完结"
else
"更新中"
+
" >"
"共"
+
it
.
vedioTotal
+
"集"
+
if
(
it
.
completeStatus
==
0
)
"已完结"
else
"更新中"
}
fm_bottom
.
setOnClickListener
(
this
)
...
...
video/app/src/main/res/drawable/btn_index_submit.xml
View file @
179518ae
...
...
@@ -2,7 +2,7 @@
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:width=
"345dp"
android:height=
"44dp"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"
#fffeb63d
"
/>
<solid
android:color=
"
@color/tv_message_recente_money
"
/>
<corners
android:radius=
"50dp"
/>
</shape>
</item>
...
...
video/app/src/main/res/drawable/btn_index_submit_unchecked.xml
View file @
179518ae
...
...
@@ -2,7 +2,7 @@
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:width=
"345dp"
android:height=
"44dp"
>
<shape
android:shape=
"rectangle"
>
<stroke
android:width=
"1dp"
android:color=
"
#fffeb63d
"
/>
<stroke
android:width=
"1dp"
android:color=
"
@color/tv_message_recente_money
"
/>
<solid
android:color=
"#ffffff"
/>
<corners
android:radius=
"50dp"
/>
</shape>
...
...
video/app/src/main/res/drawable/rb_opinion_selected.xml
View file @
179518ae
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:color=
"@android:color/white"
android:drawable=
"@drawable/btn_index_submit"
android:state_checked=
"true"
></item>
<item
android:color=
"
#FEB63D
"
android:drawable=
"@drawable/btn_index_submit_unchecked"
android:state_checked=
"false"
></item>
<item
android:color=
"
@color/tv_message_recente_money
"
android:drawable=
"@drawable/btn_index_submit_unchecked"
android:state_checked=
"false"
></item>
</selector>
\ No newline at end of file
video/app/src/main/res/layout/activity_aboutus.xml
View file @
179518ae
...
...
@@ -85,7 +85,7 @@
android:layout_marginRight=
"2dp"
android:padding=
"5dp"
android:text=
"@string/register_name"
android:textColor=
"@color/
color_FF9837
"
android:textColor=
"@color/
tv_message_recente_money
"
android:textSize=
"14sp"
/>
<View
...
...
@@ -102,7 +102,7 @@
android:layout_marginLeft=
"2dp"
android:padding=
"5dp"
android:text=
"隐私政策"
android:textColor=
"@color/
color_FF9837
"
android:textColor=
"@color/
tv_message_recente_money
"
android:textSize=
"14sp"
/>
</LinearLayout>
...
...
video/app/src/main/res/layout/activity_mobile_login.xml
View file @
179518ae
...
...
@@ -131,7 +131,7 @@
android:layout_centerVertical=
"true"
android:gravity=
"center"
android:text=
"获取验证码"
android:textColor=
"@color/
color_FF9837
"
android:textColor=
"@color/
tv_message_recente_money
"
android:textSize=
"12sp"
/>
</RelativeLayout>
...
...
video/app/src/main/res/layout/activity_video.xml
View file @
179518ae
...
...
@@ -50,7 +50,7 @@
android:layout_height=
"wrap_content"
android:layout_marginStart=
"10dp"
android:layout_weight=
"1"
android:text=
"共100集 已完结
>
"
android:text=
"共100集 已完结"
android:textColor=
"@color/white"
/>
<ImageView
...
...
video/app/src/main/res/layout/fragment_main_my.xml
View file @
179518ae
...
...
@@ -112,7 +112,7 @@
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingStart=
"20dp"
android:paddingEnd=
"
20
dp"
>
android:paddingEnd=
"
15
dp"
>
<TextView
android:layout_width=
"0dp"
...
...
@@ -143,7 +143,7 @@
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingStart=
"20dp"
android:paddingEnd=
"
20
dp"
>
android:paddingEnd=
"
15
dp"
>
<TextView
android:layout_width=
"0dp"
...
...
@@ -173,7 +173,7 @@
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingStart=
"20dp"
android:paddingEnd=
"
20
dp"
>
android:paddingEnd=
"
15
dp"
>
<TextView
android:layout_width=
"0dp"
...
...
@@ -204,7 +204,7 @@
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingStart=
"20dp"
android:paddingEnd=
"
20
dp"
>
android:paddingEnd=
"
15
dp"
>
<TextView
android:id=
"@+id/tv_contact"
...
...
@@ -235,7 +235,7 @@
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingStart=
"20dp"
android:paddingEnd=
"
20
dp"
>
android:paddingEnd=
"
15
dp"
>
<TextView
android:layout_width=
"0dp"
...
...
video/app/src/main/res/layout/web_header_layout.xml
View file @
179518ae
...
...
@@ -34,5 +34,6 @@
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_alignParentBottom=
"true"
android:background=
"#E6E6E6"
/>
android:background=
"#E6E6E6"
android:visibility=
"gone"
/>
</RelativeLayout>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment