Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_street
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_street
Commits
357011e5
Commit
357011e5
authored
Jul 28, 2021
by
张释方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复隐藏内容
parent
1e1014b3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
15 deletions
+18
-15
MainActivity.kt
app/src/main/java/com/mints/street/main/MainActivity.kt
+8
-8
activity_main.xml
app/src/main/res/layout/activity_main.xml
+6
-3
menu_navigation.xml
library_base/src/main/res/menu/menu_navigation.xml
+4
-4
No files found.
app/src/main/java/com/mints/street/main/MainActivity.kt
View file @
357011e5
...
@@ -47,21 +47,21 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
...
@@ -47,21 +47,21 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
binding
.
mainBottom
.
init
{
binding
.
mainBottom
.
init
{
when
(
it
)
{
when
(
it
)
{
R
.
id
.
menu_home
->
binding
.
mainViewpager
.
setCurrentItem
(
0
,
false
)
R
.
id
.
menu_home
->
binding
.
mainViewpager
.
setCurrentItem
(
0
,
false
)
//
R.id.menu_square -> binding.mainViewpager.setCurrentItem(1, false)
R
.
id
.
menu_square
->
binding
.
mainViewpager
.
setCurrentItem
(
1
,
false
)
R
.
id
.
menu_my
->
{
R
.
id
.
menu_my
->
{
binding
.
mainViewpager
.
setCurrentItem
(
2
,
false
)
binding
.
mainViewpager
.
setCurrentItem
(
2
,
false
)
// stopAnim()
// stopAnim()
}
}
}
}
}
}
//
//加载本地GIF动图
//加载本地GIF动图
//
ImageLoader.ImageBuilder.with(this)
ImageLoader
.
ImageBuilder
.
with
(
this
)
//
.setDrawable(R.mipmap.ic_earth_map)
.
setDrawable
(
R
.
mipmap
.
ic_earth_map
)
//
.setTargetView(binding.ivTakephoto).start()
.
setTargetView
(
binding
.
ivTakephoto
).
start
()
binding
.
mainBottom
.
interceptLongClick
(
binding
.
mainBottom
.
interceptLongClick
(
R
.
id
.
menu_home
,
R
.
id
.
menu_home
,
//
R.id.menu_square,
R
.
id
.
menu_square
,
R
.
id
.
menu_my
R
.
id
.
menu_my
)
)
...
@@ -72,8 +72,8 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
...
@@ -72,8 +72,8 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
.
subscribe
{
.
subscribe
{
}
}
//
UpdateHelper.processUpdate(this@MainActivity, UpgradeInfo("1","2","3","4",
UpdateHelper
.
processUpdate
(
this
@MainActivity
,
UpgradeInfo
(
"1"
,
"2"
,
"3"
,
"4"
,
//
"5","6","7",false))
"5"
,
"6"
,
"7"
,
false
))
}
}
...
...
app/src/main/res/layout/activity_main.xml
View file @
357011e5
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<layout>
<layout>
<data>
<data>
<variable
<variable
name=
"viewModel"
name=
"viewModel"
type=
"com.mints.street.main.MainViewModel"
/>
type=
"com.mints.street.main.MainViewModel"
/>
</data>
</data>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
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"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".main.MainActivity"
>
tools:context=
".main.MainActivity"
>
<androidx.viewpager2.widget.ViewPager2
<androidx.viewpager2.widget.ViewPager2
android:id=
"@+id/mainViewpager"
android:id=
"@+id/mainViewpager"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -35,7 +39,7 @@
...
@@ -35,7 +39,7 @@
app:menu=
"@menu/menu_navigation"
/>
app:menu=
"@menu/menu_navigation"
/>
</FrameLayout>
</FrameLayout>
<
!--<
FrameLayout
<FrameLayout
android:id=
"@+id/flTakephoto"
android:id=
"@+id/flTakephoto"
android:layout_width=
"68dp"
android:layout_width=
"68dp"
android:layout_height=
"68dp"
android:layout_height=
"68dp"
...
@@ -50,8 +54,7 @@
...
@@ -50,8 +54,7 @@
android:layout_height=
"60dp"
android:layout_height=
"60dp"
android:layout_gravity=
"center"
android:layout_gravity=
"center"
android:scaleType=
"fitXY"
/>
android:scaleType=
"fitXY"
/>
</FrameLayout>-->
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
...
...
library_base/src/main/res/menu/menu_navigation.xml
View file @
357011e5
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
android:icon=
"@drawable/menu_main"
android:icon=
"@drawable/menu_main"
android:title=
"@string/bottom_name_home"
/>
android:title=
"@string/bottom_name_home"
/>
<!-- <item-->
<item
<!-- android:id="@+id/menu_square"-->
android:id=
"@+id/menu_square"
<!-- android:icon="@drawable/menu_square"-->
android:icon=
"@drawable/menu_square"
<!-- tools:ignore="MenuTitle" />--
>
tools:ignore=
"MenuTitle"
/
>
<item
<item
...
...
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