Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
HTAnticollision
Project
Project
Details
Activity
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
马乐
HTAnticollision
Commits
db5fb933
Commit
db5fb933
authored
Mar 23, 2023
by
马乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.优化欢迎页UI
2.删除开发工具创建的默认UI
parent
be509ff3
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
79 additions
and
431 deletions
+79
-431
build.gradle
app/build.gradle
+12
-11
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-1
SplashActivity.kt
...src/main/java/com/waytous/anticollision/SplashActivity.kt
+8
-9
MainActivity.kt
...rc/main/java/com/waytous/anticollision/ui/MainActivity.kt
+1
-9
DashboardFragment.kt
...m/waytous/anticollision/ui/dashboard/DashboardFragment.kt
+0
-43
DashboardViewModel.kt
.../waytous/anticollision/ui/dashboard/DashboardViewModel.kt
+0
-14
NotificationsFragment.kt
...s/anticollision/ui/notifications/NotificationsFragment.kt
+0
-43
NotificationsViewModel.kt
.../anticollision/ui/notifications/NotificationsViewModel.kt
+0
-14
SettingsViewModel.kt
...om/waytous/anticollision/ui/settings/SettingsViewModel.kt
+1
-1
drawable_scan_preview.xml
app/src/main/res/drawable/drawable_scan_preview.xml
+32
-0
ic_dashboard_black_24dp.xml
app/src/main/res/drawable/ic_dashboard_black_24dp.xml
+0
-9
ic_launcher_background.xml
app/src/main/res/drawable/ic_launcher_background.xml
+0
-170
ic_notifications_black_24dp.xml
app/src/main/res/drawable/ic_notifications_black_24dp.xml
+0
-9
activity_main.xml
app/src/main/res/layout/activity_main.xml
+0
-13
activity_splash.xml
app/src/main/res/layout/activity_splash.xml
+2
-1
fragment_dashboard.xml
app/src/main/res/layout/fragment_dashboard.xml
+0
-23
fragment_home.xml
app/src/main/res/layout/fragment_home.xml
+10
-0
fragment_notifications.xml
app/src/main/res/layout/fragment_notifications.xml
+0
-23
bottom_nav_menu.xml
app/src/main/res/menu/bottom_nav_menu.xml
+0
-20
activity_navigation.xml
app/src/main/res/navigation/activity_navigation.xml
+2
-1
mobile_navigation.xml
app/src/main/res/navigation/mobile_navigation.xml
+0
-12
themes.xml
app/src/main/res/values-night/themes.xml
+8
-5
themes.xml
app/src/main/res/values/themes.xml
+2
-0
No files found.
app/build.gradle
View file @
db5fb933
...
...
@@ -41,14 +41,14 @@ android {
dependencies
{
implementation
'androidx.core:core-ktx:1.
7
.0'
implementation
'androidx.appcompat:appcompat:1.
4
.1'
implementation
'com.google.android.material:material:1.
5
.0'
implementation
'androidx.constraintlayout:constraintlayout:2.1.
3
'
implementation
'androidx.lifecycle:lifecycle-livedata-ktx:2.
4
.1'
implementation
'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.
0
'
implementation
'androidx.navigation:navigation-fragment-ktx:2.
4.1
'
implementation
'androidx.navigation:navigation-ui-ktx:2.
4.1
'
implementation
'androidx.core:core-ktx:1.
8
.0'
implementation
'androidx.appcompat:appcompat:1.
5
.1'
implementation
'com.google.android.material:material:1.
7
.0'
implementation
'androidx.constraintlayout:constraintlayout:2.1.
4
'
implementation
'androidx.lifecycle:lifecycle-livedata-ktx:2.
5
.1'
implementation
'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.
1
'
implementation
'androidx.navigation:navigation-fragment-ktx:2.
5.3
'
implementation
'androidx.navigation:navigation-ui-ktx:2.
5.3
'
implementation
'com.squareup.okhttp3:okhttp:4.10.0'
implementation
'com.mapbox.maps:android:10.11.0'
implementation
'com.mapbox.mapboxsdk:mapbox-sdk-geojson:6.9.0'
...
...
@@ -56,10 +56,10 @@ dependencies {
implementation
'io.github.toggery:jt808-codec:2.0.3'
implementation
'com.blankj:utilcodex:1.31.1'
implementation
'com.blankj:utilcodex:1.31.1'
implementation
'org.jetbrains.kotlin:kotlin-reflect:1.7.2
0
'
implementation
'org.jetbrains.kotlin:kotlin-reflect:1.7.2
2
'
implementation
'com.geyifeng.immersionbar:immersionbar:3.2.2'
implementation
'androidx.work:work-runtime-ktx:2.7.1'
testImplementation
'junit:junit:4.13.2'
androidTestImplementation
'androidx.test.ext:junit:1.1.
3
'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.
4
.0'
androidTestImplementation
'androidx.test.ext:junit:1.1.
4
'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.
5
.0'
}
\ No newline at end of file
app/src/main/AndroidManifest.xml
View file @
db5fb933
...
...
@@ -29,7 +29,7 @@
</intent-filter>
</activity>
<activity
android:name=
".
activity
.MainActivity"
android:name=
".
ui
.MainActivity"
android:exported=
"true"
android:screenOrientation=
"landscape"
>
<intent-filter>
...
...
app/src/main/java/com/waytous/anticollision/SplashActivity.kt
View file @
db5fb933
...
...
@@ -3,6 +3,8 @@ package com.waytous.anticollision
import
android.os.Bundle
import
android.view.View
import
androidx.appcompat.app.AppCompatActivity
import
com.blankj.utilcode.util.BarUtils
import
com.blankj.utilcode.util.ColorUtils
import
com.waytous.anticollision.databinding.ActivitySplashBinding
class
SplashActivity
:
AppCompatActivity
()
{
...
...
@@ -11,17 +13,14 @@ class SplashActivity : AppCompatActivity() {
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
window
.
decorView
.
apply
{
// Hide both the navigation bar and the status bar.
// SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but as
// a general rule, you should design your app to hide the status bar whenever you
// hide the navigation bar.
systemUiVisibility
=
View
.
SYSTEM_UI_FLAG_HIDE_NAVIGATION
or
View
.
SYSTEM_UI_FLAG_FULLSCREEN
}
//设置下布局向上移动状态栏的高度
BarUtils
.
setStatusBarColor
(
this
,
ColorUtils
.
getColor
(
R
.
color
.
white
))
//设置隐藏虚拟按键
BarUtils
.
setNavBarVisibility
(
this
,
false
);
binding
=
ActivitySplashBinding
.
inflate
(
layoutInflater
)
setContentView
(
binding
.
root
)
"${getString(R.string.text_progress,
26
)}%"
.
also
{
binding
.
textProgress
.
text
=
it
}
binding
.
loadingProgressBar
.
progress
=
26
"${getString(R.string.text_progress,
57
)}%"
.
also
{
binding
.
textProgress
.
text
=
it
}
binding
.
loadingProgressBar
.
progress
=
57
binding
.
loadingProgressBar
.
show
()
}
...
...
app/src/main/java/com/waytous/anticollision/
activity
/MainActivity.kt
→
app/src/main/java/com/waytous/anticollision/
ui
/MainActivity.kt
View file @
db5fb933
package
com.waytous.anticollision.
activity
package
com.waytous.anticollision.
ui
import
android.os.Bundle
import
androidx.appcompat.app.AppCompatActivity
...
...
@@ -25,7 +25,6 @@ class MainActivity : AppCompatActivity() {
.
fitsSystemWindows
(
true
)
binding
=
ActivityMainBinding
.
inflate
(
layoutInflater
)
setContentView
(
binding
.
root
)
initNavView
()
DeviceConfig
.
province
=
11
DeviceConfig
.
city
=
0
...
...
@@ -37,10 +36,4 @@ class MainActivity : AppCompatActivity() {
thread
{
session
.
login
()
}
}
private
fun
initNavView
(){
val
navView
:
BottomNavigationView
=
binding
.
navView
val
fragmentContainerView
=
supportFragmentManager
.
findFragmentById
(
R
.
id
.
nav_host_fragment_activity_main
)
as
NavHostFragment
val
navController
=
fragmentContainerView
.
navController
navView
.
setupWithNavController
(
navController
)
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/dashboard/DashboardFragment.kt
deleted
100644 → 0
View file @
be509ff3
package
com.waytous.anticollision.ui.dashboard
import
android.os.Bundle
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.TextView
import
androidx.fragment.app.Fragment
import
androidx.lifecycle.ViewModelProvider
import
com.waytous.anticollision.databinding.FragmentDashboardBinding
class
DashboardFragment
:
Fragment
()
{
private
var
_binding
:
FragmentDashboardBinding
?
=
null
// This property is only valid between onCreateView and
// onDestroyView.
private
val
binding
get
()
=
_binding
!!
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
{
val
dashboardViewModel
=
ViewModelProvider
(
this
)[
DashboardViewModel
::
class
.
java
]
_binding
=
FragmentDashboardBinding
.
inflate
(
inflater
,
container
,
false
)
val
root
:
View
=
binding
.
root
val
textView
:
TextView
=
binding
.
textDashboard
dashboardViewModel
.
text
.
observe
(
viewLifecycleOwner
)
{
textView
.
text
=
it
}
return
root
}
override
fun
onDestroyView
()
{
super
.
onDestroyView
()
_binding
=
null
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/dashboard/DashboardViewModel.kt
deleted
100644 → 0
View file @
be509ff3
package
com.waytous.anticollision.ui.dashboard
import
androidx.lifecycle.LiveData
import
androidx.lifecycle.MutableLiveData
import
androidx.lifecycle.ViewModel
class
DashboardViewModel
:
ViewModel
()
{
private
val
_text
=
MutableLiveData
<
String
>().
apply
{
value
=
"This is dashboard Fragment"
}
val
text
:
LiveData
<
String
>
=
_text
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/notifications/NotificationsFragment.kt
deleted
100644 → 0
View file @
be509ff3
package
com.waytous.anticollision.ui.notifications
import
android.os.Bundle
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.TextView
import
androidx.fragment.app.Fragment
import
androidx.lifecycle.ViewModelProvider
import
com.waytous.anticollision.databinding.FragmentNotificationsBinding
class
NotificationsFragment
:
Fragment
()
{
private
var
_binding
:
FragmentNotificationsBinding
?
=
null
// This property is only valid between onCreateView and
// onDestroyView.
private
val
binding
get
()
=
_binding
!!
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
{
val
notificationsViewModel
=
ViewModelProvider
(
this
).
get
(
NotificationsViewModel
::
class
.
java
)
_binding
=
FragmentNotificationsBinding
.
inflate
(
inflater
,
container
,
false
)
val
root
:
View
=
binding
.
root
val
textView
:
TextView
=
binding
.
textNotifications
notificationsViewModel
.
text
.
observe
(
viewLifecycleOwner
)
{
textView
.
text
=
it
}
return
root
}
override
fun
onDestroyView
()
{
super
.
onDestroyView
()
_binding
=
null
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/notifications/NotificationsViewModel.kt
deleted
100644 → 0
View file @
be509ff3
package
com.waytous.anticollision.ui.notifications
import
androidx.lifecycle.LiveData
import
androidx.lifecycle.MutableLiveData
import
androidx.lifecycle.ViewModel
class
NotificationsViewModel
:
ViewModel
()
{
private
val
_text
=
MutableLiveData
<
String
>().
apply
{
value
=
"This is notifications Fragment"
}
val
text
:
LiveData
<
String
>
=
_text
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/
viewmodel
/settings/SettingsViewModel.kt
→
app/src/main/java/com/waytous/anticollision/
ui
/settings/SettingsViewModel.kt
View file @
db5fb933
package
com.waytous.anticollision.
viewmodel
.settings
package
com.waytous.anticollision.
ui
.settings
import
androidx.lifecycle.ViewModel
import
com.waytous.anticollision.config.Settings
...
...
app/src/main/res/drawable/drawable_scan_preview.xml
0 → 100644
View file @
db5fb933
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:width=
"103dp"
android:height=
"103dp"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"#ffffffff"
/>
<corners
android:topLeftRadius=
"0dp"
android:topRightRadius=
"0dp"
android:bottomLeftRadius=
"0dp"
android:bottomRightRadius=
"0dp"
/>
</shape>
</item>
<item
android:width=
"61dp"
android:height=
"66dp"
android:top=
"17dp"
android:left=
"19.5dp"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"#ffd8d8d8"
/>
<corners
android:topLeftRadius=
"0dp"
android:topRightRadius=
"0dp"
android:bottomLeftRadius=
"0dp"
android:bottomRightRadius=
"0dp"
/>
</shape>
</item>
<item
android:width=
"33dp"
android:height=
"34dp"
android:left=
"33.dp"
android:top=
"1.5dp"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"#ffd8d8d8"
/>
<corners
android:topLeftRadius=
"0dp"
android:topRightRadius=
"0dp"
android:bottomLeftRadius=
"0dp"
android:bottomRightRadius=
"0dp"
/>
</shape>
</item>
<item
android:width=
"50dp"
android:height=
"42dp"
android:left=
"1.5dp"
android:top=
"1.5dp"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"#ffff0000"
/>
</shape>
</item>
<item
android:width=
"50dp"
android:height=
"42dp"
android:left=
"51.5dp"
android:top=
"1.5dp"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"#ffffcb00"
/>
</shape>
</item>
</layer-list>
\ No newline at end of file
app/src/main/res/drawable/ic_dashboard_black_24dp.xml
deleted
100644 → 0
View file @
be509ff3
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M3,13h8L11,3L3,3v10zM3,21h8v-6L3,15v6zM13,21h8L21,11h-8v10zM13,3v6h8L21,3h-8z"
/>
</vector>
app/src/main/res/drawable/ic_launcher_background.xml
deleted
100644 → 0
View file @
be509ff3
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"108dp"
android:height=
"108dp"
android:viewportWidth=
"108"
android:viewportHeight=
"108"
>
<path
android:fillColor=
"#3DDC84"
android:pathData=
"M0,0h108v108h-108z"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M9,0L9,108"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M19,0L19,108"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M29,0L29,108"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M39,0L39,108"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M49,0L49,108"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M59,0L59,108"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M69,0L69,108"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M79,0L79,108"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M89,0L89,108"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M99,0L99,108"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M0,9L108,9"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M0,19L108,19"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M0,29L108,29"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M0,39L108,39"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M0,49L108,49"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M0,59L108,59"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M0,69L108,69"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M0,79L108,79"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M0,89L108,89"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M0,99L108,99"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M19,29L89,29"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M19,39L89,39"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M19,49L89,49"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M19,59L89,59"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M19,69L89,69"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M19,79L89,79"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M29,19L29,89"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M39,19L39,89"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M49,19L49,89"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M59,19L59,89"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M69,19L69,89"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M79,19L79,89"
android:strokeWidth=
"0.8"
android:strokeColor=
"#33FFFFFF"
/>
</vector>
app/src/main/res/drawable/ic_notifications_black_24dp.xml
deleted
100644 → 0
View file @
be509ff3
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z"
/>
</vector>
app/src/main/res/layout/activity_main.xml
View file @
db5fb933
...
...
@@ -5,25 +5,12 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id=
"@+id/nav_view"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"0dp"
android:layout_marginEnd=
"0dp"
android:background=
"?android:attr/windowBackground"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:menu=
"@menu/bottom_nav_menu"
/>
<androidx.fragment.app.FragmentContainerView
android:id=
"@+id/nav_host_fragment_activity_main"
android:name=
"androidx.navigation.fragment.NavHostFragment"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:defaultNavHost=
"true"
app:layout_constraintBottom_toTopOf=
"@id/nav_view"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
...
...
app/src/main/res/layout/activity_splash.xml
View file @
db5fb933
...
...
@@ -50,5 +50,5 @@
app:layout_constraintLeft_toRightOf=
"@id/loadingProgressBar"
app:layout_constraintTop_toTopOf=
"@id/loadingProgressBar"
app:layout_constraintBottom_toBottomOf=
"@id/loadingProgressBar"
/>
tools:ignore=
"SmallSp"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_dashboard.xml
deleted
100644 → 0
View file @
be509ff3
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".ui.dashboard.DashboardFragment"
>
<TextView
android:id=
"@+id/text_dashboard"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:layout_marginTop=
"8dp"
android:layout_marginEnd=
"8dp"
android:textAlignment=
"center"
android:textSize=
"20sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_home.xml
View file @
db5fb933
...
...
@@ -7,6 +7,16 @@
android:layout_height=
"match_parent"
tools:context=
".ui.home.HomeFragment"
>
<ImageView
android:id=
"@+id/scanPreview"
android:layout_width=
"103dp"
android:layout_height=
"103dp"
android:layout_marginStart=
"14dp"
android:layout_marginTop=
"14.5dp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<com.mapbox.maps.MapView
android:id=
"@+id/mapView"
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/fragment_notifications.xml
deleted
100644 → 0
View file @
be509ff3
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".ui.notifications.NotificationsFragment"
>
<TextView
android:id=
"@+id/text_notifications"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:layout_marginTop=
"8dp"
android:layout_marginEnd=
"8dp"
android:textAlignment=
"center"
android:textSize=
"20sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/menu/bottom_nav_menu.xml
deleted
100644 → 0
View file @
be509ff3
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@+id/navigation_home"
android:icon=
"@drawable/ic_home_black_24dp"
android:title=
"@string/title_home"
/>
<item
android:id=
"@+id/navigation_dashboard"
android:icon=
"@drawable/ic_dashboard_black_24dp"
android:title=
"@string/title_dashboard"
/>
<item
android:id=
"@+id/navigation_notifications"
android:icon=
"@drawable/ic_notifications_black_24dp"
android:title=
"@string/title_notifications"
/>
</menu>
\ No newline at end of file
app/src/main/res/navigation/activity_navigation.xml
View file @
db5fb933
...
...
@@ -12,7 +12,7 @@
tools:layout=
"@layout/activity_splash"
/>
<activity
android:id=
"@+id/mainActivity"
android:name=
"com.waytous.anticollision.
activity
.MainActivity"
android:name=
"com.waytous.anticollision.
ui
.MainActivity"
android:label=
"MainActivity"
/>
</navigation>
\ No newline at end of file
app/src/main/res/navigation/mobile_navigation.xml
View file @
db5fb933
...
...
@@ -11,15 +11,4 @@
android:label=
"@string/title_home"
tools:layout=
"@layout/fragment_home"
/>
<fragment
android:id=
"@+id/navigation_dashboard"
android:name=
"com.waytous.anticollision.ui.dashboard.DashboardFragment"
android:label=
"@string/title_dashboard"
tools:layout=
"@layout/fragment_dashboard"
/>
<fragment
android:id=
"@+id/navigation_notifications"
android:name=
"com.waytous.anticollision.ui.notifications.NotificationsFragment"
android:label=
"@string/title_notifications"
tools:layout=
"@layout/fragment_notifications"
/>
</navigation>
\ No newline at end of file
app/src/main/res/values-night/themes.xml
View file @
db5fb933
...
...
@@ -9,6 +9,12 @@
<item
name=
"colorSecondary"
>
@color/teal_200
</item>
<item
name=
"colorSecondaryVariant"
>
@color/teal_200
</item>
<item
name=
"colorOnSecondary"
>
@color/black
</item>
</style>
<!-- 启动页 -->
<style
name=
"SplashTheme"
parent=
"Theme.HTAnticollision"
>
<!--给window窗口设置背景图-->
<item
name=
"android:windowBackground"
>
@mipmap/splash_background
</item>
<!--设置顶部状态栏是否为透明-->
<item
name=
"android:windowTranslucentStatus"
>
false
</item>
...
...
@@ -20,12 +26,8 @@
<item
name=
"windowActionBar"
>
false
</item>
<item
name=
"windowNoTitle"
>
true
</item>
<item
name=
"android:windowFullscreen"
>
true
</item>
</style>
<!-- 启动页 -->
<style
name=
"SplashTheme"
parent=
"Theme.HTAnticollision"
>
<item
name=
"android:windowDisablePreview"
>
false
</item>
<item
name=
"android:windowIsTranslucent"
>
false
</item>
</style>
</resources>
\ No newline at end of file
app/src/main/res/values/themes.xml
View file @
db5fb933
...
...
@@ -27,5 +27,6 @@
<item
name=
"windowNoTitle"
>
true
</item>
<item
name=
"android:windowFullscreen"
>
true
</item>
<item
name=
"android:windowDisablePreview"
>
false
</item>
<item
name=
"android:windowIsTranslucent"
>
false
</item>
</style>
</resources>
\ 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