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
463c34c7
Commit
463c34c7
authored
Jan 10, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
a9b6d4d9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
15 deletions
+39
-15
Constant.kt
...pp/src/main/java/com/duben/loveplaylet/common/Constant.kt
+1
-0
MobileLoginActivity.kt
...com/duben/loveplaylet/ui/activitys/MobileLoginActivity.kt
+17
-9
MainFragment.kt
...in/java/com/duben/loveplaylet/ui/fragment/MainFragment.kt
+1
-0
shape_bg_black3.xml
video/app/src/main/res/drawable/shape_bg_black3.xml
+10
-0
dialog_detail_ad.xml
video/app/src/main/res/layout/dialog_detail_ad.xml
+10
-6
No files found.
video/app/src/main/java/com/duben/loveplaylet/common/Constant.kt
View file @
463c34c7
...
...
@@ -17,6 +17,7 @@ object Constant {
const
val
IS_FIRST_AGREE_BTN
=
"is_first_agree_btn"
const
val
IS_FIRST_VIP_BTN
=
"is_first_agree_btn"
const
val
IS_FIRST_VEDIO
=
"is_first_vedio"
const
val
IS_FIRST_VEDIO_NEWFLAG
=
"is_first_vedio_newflag"
const
val
TAG_NAME
=
"SUN"
const
val
MINTS_APP_NAME
=
"爱短剧"
const
val
MINTS_PKG_NAME
=
"com.duben.loveplaylet"
...
...
video/app/src/main/java/com/duben/loveplaylet/ui/activitys/MobileLoginActivity.kt
View file @
463c34c7
...
...
@@ -23,10 +23,7 @@ import com.duben.loveplaylet.mvp.views.LoginView
import
com.duben.loveplaylet.ui.activitys.base.BaseActivity
import
com.duben.loveplaylet.ui.widgets.CustomDialogAsApple
import
com.duben.loveplaylet.ui.widgets.DialogListener
import
com.duben.loveplaylet.utils.BackInputUtil
import
com.duben.loveplaylet.utils.LogUtil
import
com.duben.loveplaylet.utils.SpanUtils
import
com.duben.loveplaylet.utils.ToastUtil
import
com.duben.loveplaylet.utils.*
import
kotlinx.android.synthetic.main.activity_mobile_login.*
import
kotlinx.android.synthetic.main.header_layout.*
...
...
@@ -260,13 +257,24 @@ class MobileLoginActivity : BaseActivity(), LoginView, View.OnClickListener {
dialog
?.
dismiss
()
when
(
v
?.
id
)
{
R
.
id
.
dialog_btn_left
->
{
val
flag
=
AppPreferencesManager
.
get
()
.
getBoolean
(
Constant
.
IS_FIRST_VEDIO_NEWFLAG
,
false
)
if
(
flag
)
{
// 匹配用户看短剧
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_FIRST_VEDIO_NEWFLAG
,
false
)
finish
()
}
else
{
readyGo
(
MainActivity
::
class
.
java
)
val
activity
=
ActivityPageManager
.
getInstance
().
getActivity
(
MainActivity
::
class
.
java
)
ActivityPageManager
.
getInstance
()
.
getActivity
(
MainActivity
::
class
.
java
)
if
(
activity
!=
null
&&
activity
is
MainActivity
)
{
activity
.
clickTab4Layout
()
}
}
}
R
.
id
.
dialog_btn_right
->
{
}
...
...
video/app/src/main/java/com/duben/loveplaylet/ui/fragment/MainFragment.kt
View file @
463c34c7
...
...
@@ -336,6 +336,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
val
firstVedio
=
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
IS_FIRST_VEDIO
,
true
)
if
(
data
!=
null
&&
data
.
vedioMsg
!=
null
&&
firstVedio
)
{
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_FIRST_VEDIO
,
false
)
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_FIRST_VEDIO_NEWFLAG
,
true
)
LocalVedioManager
.
startVedioDetailActivityForType
(
requireActivity
(),
data
.
vedioMsg
)
}
else
{
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
...
...
video/app/src/main/res/drawable/shape_bg_black3.xml
0 → 100644
View file @
463c34c7
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<!-- 填充的颜色 -->
<solid
android:color=
"#000000"
/>
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners
android:radius=
"15dip"
/>
</shape>
\ No newline at end of file
video/app/src/main/res/layout/dialog_detail_ad.xml
View file @
463c34c7
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:background=
"@color/black"
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"
match_par
ent"
android:layout_height=
"
match_par
ent"
android:layout_width=
"
wrap_cont
ent"
android:layout_height=
"
wrap_cont
ent"
android:layout_centerInParent=
"true"
android:background=
"@drawable/shape_bg_black3"
android:gravity=
"center"
android:orientation=
"vertical"
>
<FrameLayout
android:layout_width=
"wrap_content"
android:layout_marginTop=
"20dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:background=
"@mipmap/bg_detail_top2"
></FrameLayout>
<FrameLayout
android:layout_marginLeft=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
...
...
@@ -42,17 +46,17 @@
android:layout_width=
"280dp"
android:layout_height=
"46dp"
android:layout_marginTop=
"20dp"
android:layout_marginBottom=
"
1
0dp"
android:layout_marginBottom=
"
2
0dp"
android:background=
"@mipmap/bg_detail_bottom"
android:textColor=
"@color/color_815136"
/>
<ImageView
android:visibility=
"gone"
android:id=
"@+id/iv_detail_quit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"5dp"
android:src=
"@mipmap/ic_quit_yuan"
></ImageView>
android:src=
"@mipmap/ic_quit_yuan"
android:visibility=
"gone"
></ImageView>
</LinearLayout>
</RelativeLayout>
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