Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_youyou
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_youyou
Commits
59fb3492
Commit
59fb3492
authored
Mar 18, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
970fe8f0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
MainActivity.kt
.../main/java/com/wenshu/youyou/ui/activitys/MainActivity.kt
+9
-8
ic_launcher_main.png
app/src/main/res/drawable-xhdpi/ic_launcher_main.png
+0
-0
splash_bg.xml
app/src/main/res/drawable/splash_bg.xml
+1
-1
activity_main.xml
app/src/main/res/layout/activity_main.xml
+2
-0
No files found.
app/src/main/java/com/wenshu/youyou/ui/activitys/MainActivity.kt
View file @
59fb3492
...
@@ -47,19 +47,20 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
...
@@ -47,19 +47,20 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
// ZhangyueManager.onCreateIreader(baseApplication)
// ZhangyueManager.onCreateIreader(baseApplication)
showShortVedioLayout
()
// showShortVedioLayout()
AppConfig
.
fragmentClickFlag
=
Constant
.
FRAGMENT_CLICK_FIVE
if
(
m
one
yFragment
==
null
)
{
if
(
myFragment
==
null
)
{
m
oneyFragment
=
Mone
yFragment
()
m
yFragment
=
M
yFragment
()
}
}
if
(!
m
one
yFragment
!!
.
isAdded
)
{
if
(!
myFragment
!!
.
isAdded
)
{
// 提交事务
// 提交事务
supportFragmentManager
.
beginTransaction
()
supportFragmentManager
.
beginTransaction
()
.
add
(
R
.
id
.
content_layout
,
m
one
yFragment
!!
).
commitAllowingStateLoss
()
.
add
(
R
.
id
.
content_layout
,
myFragment
!!
).
commitAllowingStateLoss
()
// 记录当前Fragment
// 记录当前Fragment
currentFragment
=
m
one
yFragment
currentFragment
=
myFragment
}
}
if
(
AppConfig
.
isMainShowWz
)
{
if
(
AppConfig
.
isMainShowWz
)
{
...
@@ -72,8 +73,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
...
@@ -72,8 +73,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
isMainShowWz
=
false
isMainShowWz
=
false
}
}
tab_iv_
on
e
.
isSelected
=
true
tab_iv_
fiv
e
.
isSelected
=
true
tab_tv_
on
e
.
isSelected
=
true
tab_tv_
fiv
e
.
isSelected
=
true
tab_rl_one
.
setOnClickListener
(
this
)
tab_rl_one
.
setOnClickListener
(
this
)
tab_rl_three
.
setOnClickListener
(
this
)
tab_rl_three
.
setOnClickListener
(
this
)
...
...
app/src/main/res/drawable-xhdpi/ic_launcher_main.png
0 → 100644
View file @
59fb3492
4.66 KB
app/src/main/res/drawable/splash_bg.xml
View file @
59fb3492
...
@@ -8,6 +8,6 @@
...
@@ -8,6 +8,6 @@
<item
android:bottom=
"20dp"
>
<item
android:bottom=
"20dp"
>
<bitmap
<bitmap
android:gravity=
"bottom|center_horizontal"
android:gravity=
"bottom|center_horizontal"
android:src=
"@drawable/
bg_splash
"
/>
android:src=
"@drawable/
ic_launcher_main
"
/>
</item>
</item>
</layer-list>
</layer-list>
app/src/main/res/layout/activity_main.xml
View file @
59fb3492
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<LinearLayout
<LinearLayout
android:visibility=
"gone"
android:id=
"@+id/tab_rl_one"
android:id=
"@+id/tab_rl_one"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
...
@@ -50,6 +51,7 @@
...
@@ -50,6 +51,7 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:visibility=
"gone"
android:id=
"@+id/tab_rl_two"
android:id=
"@+id/tab_rl_two"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
...
...
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