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
f0cc5af9
Commit
f0cc5af9
authored
Jul 13, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
179518ae
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
17 deletions
+22
-17
Constant.kt
...pp/src/main/java/com/mints/wisdomclean/common/Constant.kt
+1
-1
SplashActivity.kt
...java/com/mints/wisdomclean/ui/activitys/SplashActivity.kt
+4
-6
SplashAdActivity.kt
...va/com/mints/wisdomclean/ui/activitys/SplashAdActivity.kt
+4
-5
VipActivity.kt
...in/java/com/mints/wisdomclean/ui/activitys/VipActivity.kt
+7
-3
TopAdapter.kt
.../main/java/com/mints/wisdomclean/ui/adapter/TopAdapter.kt
+1
-1
fragment_main.xml
video/app/src/main/res/layout/fragment_main.xml
+5
-1
No files found.
video/app/src/main/java/com/mints/wisdomclean/common/Constant.kt
View file @
f0cc5af9
...
...
@@ -14,7 +14,7 @@ object Constant {
const
val
LOAN_PERMISSION_FLAG
=
"loan_permission_flag"
const
val
FIRST_SPLASH
=
"first_splash"
const
val
IS_FIRST_AGREE_BTN
=
"is_first_agree_btn"
const
val
IS_FIRST_VIP_
NUM
=
"is_first_agree_num
"
const
val
IS_FIRST_VIP_
BTN
=
"is_first_agree_btn
"
const
val
TAG_NAME
=
"SUN"
const
val
MINTS_APP_NAME
=
"河狸短视频"
const
val
MINTS_PKG_NAME
=
"com.mints.wisdomclean"
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/activitys/SplashActivity.kt
View file @
f0cc5af9
...
...
@@ -142,12 +142,10 @@ class SplashActivity : BaseActivity() {
* 跳转到主页面
*/
private
fun
goToMainActivity
()
{
// if (UserManager.getInstance().newFlag && !UserManager.getInstance().vipFlag) {
var
vipEnterNum
=
AppPreferencesManager
.
get
().
getInt
(
Constant
.
IS_FIRST_VIP_NUM
,
1
)
if
(!
UserManager
.
getInstance
().
vipFlag
&&
vipEnterNum
<=
1
)
{
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_FIRST_VIP_NUM
,
vipEnterNum
++)
// val vipEnter = AppPreferencesManager.get().getBoolean(Constant.IS_FIRST_VIP_BTN, false)
// if ((UserManager.getInstance().newFlag && !UserManager.getInstance().vipFlag) || !vipEnter) {
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
// AppPreferencesManager.get().put(Constant.IS_FIRST_VIP_BTN, true)
// 匹配用户 且 不是vip
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
VipActivity
.
IS_GUIDE
,
true
)
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/activitys/SplashAdActivity.kt
View file @
f0cc5af9
...
...
@@ -95,11 +95,10 @@ class SplashAdActivity : BaseActivity() {
* 跳转到主页面
*/
private
fun
goToMainActivity
()
{
// if (UserManager.getInstance().newFlag&&!UserManager.getInstance().vipFlag) {
var
vipEnterNum
=
AppPreferencesManager
.
get
().
getInt
(
Constant
.
IS_FIRST_VIP_NUM
,
1
)
if
(!
UserManager
.
getInstance
().
vipFlag
&&
vipEnterNum
<=
1
)
{
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_FIRST_VIP_NUM
,
vipEnterNum
++)
// val vipEnter = AppPreferencesManager.get().getBoolean(Constant.IS_FIRST_VIP_BTN, false)
// if ((UserManager.getInstance().newFlag && !UserManager.getInstance().vipFlag) || !vipEnter) {
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
// AppPreferencesManager.get().put(Constant.IS_FIRST_VIP_BTN, true)
// 匹配用户 且 不是vip
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
VipActivity
.
IS_GUIDE
,
true
)
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/activitys/VipActivity.kt
View file @
f0cc5af9
...
...
@@ -130,7 +130,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
ll_vip_alipay
.
visibility
=
View
.
GONE
ll_vip_wx
.
visibility
=
View
.
VISIBLE
payType
=
WEIXIN_PAY
iv_vip_wx
.
setImageResource
(
R
.
mipmap
.
ic_vip_enable
)
iv_vip_wx
.
setImageResource
(
R
.
mipmap
.
ic_vip_enable
_blue
)
iv_vip_alipay
.
setImageResource
(
R
.
mipmap
.
ic_vip_none
)
}
...
...
@@ -189,7 +189,9 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
?):
Boolean
{
when
(
keyCode
)
{
KeyEvent
.
KEYCODE_BACK
->
{
if
(!
UserManager
.
getInstance
().
vipFlag
&&
vipList
!=
null
&&
vipList
!!
.
size
>
0
)
{
if
(!
UserManager
.
getInstance
().
vipFlag
&&
UserManager
.
getInstance
().
newFlag
&&
vipList
!=
null
&&
vipList
!!
.
size
>
0
)
{
vipAdapter
.
setPosition
(
0
)
vipAdapter
.
notifyDataSetChanged
()
...
...
@@ -220,7 +222,9 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
when
(
v
?.
id
)
{
R
.
id
.
ic_vip_quit
->
{
if
(!
UserManager
.
getInstance
().
vipFlag
&&
vipList
!=
null
&&
vipList
!!
.
size
>
0
)
{
if
(!
UserManager
.
getInstance
().
vipFlag
&&
UserManager
.
getInstance
().
newFlag
&&
vipList
!=
null
&&
vipList
!!
.
size
>
0
)
{
vipAdapter
.
setPosition
(
0
)
vipAdapter
.
notifyDataSetChanged
()
val
vipBean
=
vipList
!!
[
0
]
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/adapter/TopAdapter.kt
View file @
f0cc5af9
...
...
@@ -39,7 +39,7 @@ class TopAdapter(val topList: MutableList<VedioBean>?) :
val
topBean
=
topList
?.
get
(
position
)
if
(
topBean
!=
null
)
{
holder
.
tvTopItemLable
.
text
=
"${position + 1}"
holder
.
tvTopItemCount
.
text
=
topBean
.
hot
holder
.
tvTopItemCount
.
text
=
topBean
.
showNum
holder
.
tvTopItemTitle
.
text
=
"${topBean.title}"
if
(
topBean
.
orderTags
!=
null
&&
topBean
.
orderTags
.
size
>
0
)
{
val
sb
=
StringBuilder
()
...
...
video/app/src/main/res/layout/fragment_main.xml
View file @
f0cc5af9
...
...
@@ -177,6 +177,7 @@
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:text=
"我去平行时空"
android:singleLine=
"true"
android:textColor=
"@color/white"
android:textSize=
"14sp"
/>
...
...
@@ -186,6 +187,8 @@
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:text=
"重生 虐恋"
android:singleLine=
"true"
android:layout_marginBottom=
"2dp"
android:textColor=
"@color/white"
android:textSize=
"10sp"
/>
...
...
@@ -194,6 +197,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"重生 虐恋"
android:singleLine=
"true"
android:textColor=
"@color/graya"
android:textSize=
"10sp"
/>
</LinearLayout>
...
...
@@ -213,7 +217,7 @@
<TextView
android:id=
"@+id/tv_main_watching_goto"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
120dp
"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
...
...
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