增加离线地图下载流程
This commit is contained in:
8
app/src/main/res/color/btn_blue_white.xml
Normal file
8
app/src/main/res/color/btn_blue_white.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false" android:color="#8cc1ff"/>
|
||||
<item android:state_checked="true" android:color="@color/white"></item>
|
||||
<item android:state_selected="true" android:color="@color/white"></item>
|
||||
<item android:state_pressed="true" android:color="@color/white"></item>
|
||||
<item android:color="#108ee9"></item>
|
||||
</selector>
|
||||
5
app/src/main/res/drawable/baseline_map_24.xml
Normal file
5
app/src/main/res/drawable/baseline_map_24.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#100F0F"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M20.5,3l-0.16,0.03L15,5.1 9,3 3.36,4.9c-0.21,0.07 -0.36,0.25 -0.36,0.48V20.5c0,0.28 0.22,0.5 0.5,0.5l0.16,-0.03L9,18.9l6,2.1 5.64,-1.9c0.21,-0.07 0.36,-0.25 0.36,-0.48V3.5c0,-0.28 -0.22,-0.5 -0.5,-0.5zM15,19l-6,-2.11V5l6,2.11V19z"/>
|
||||
</vector>
|
||||
6
app/src/main/res/drawable/btn_back_xml.xml
Normal file
6
app/src/main/res/drawable/btn_back_xml.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:state_enabled="true" android:state_pressed="false" android:drawable="@mipmap/icon_back_n"/>
|
||||
<item android:state_pressed="true" android:drawable="@mipmap/icon_back_p"/>
|
||||
<item android:state_enabled="false" android:drawable="@mipmap/icon_back_n"/>
|
||||
</selector>
|
||||
26
app/src/main/res/drawable/fm_card_map_btn_bg_line.xml
Normal file
26
app/src/main/res/drawable/fm_card_map_btn_bg_line.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_pressed="true"><shape android:shape="rectangle">
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#03bef3" android:endColor="#0c5ce8" android:angle="45" />
|
||||
<corners android:topLeftRadius="2dp" android:topRightRadius="0dp" android:bottomLeftRadius="2dp" android:bottomRightRadius="0dp" />
|
||||
</shape></item>
|
||||
<item android:state_focused="true"><shape android:shape="rectangle">
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#03bef3" android:endColor="#0c5ce8" android:angle="45" />
|
||||
<corners android:topLeftRadius="2dp" android:topRightRadius="0dp" android:bottomLeftRadius="2dp" android:bottomRightRadius="0dp" />
|
||||
</shape></item>
|
||||
<item android:state_checked="true"><shape android:shape="rectangle">
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#03bef3" android:endColor="#0c5ce8" android:angle="45" />
|
||||
<corners android:topLeftRadius="2dp" android:topRightRadius="0dp" android:bottomLeftRadius="2dp" android:bottomRightRadius="0dp" />
|
||||
</shape></item>
|
||||
<item android:state_selected="true"><shape android:shape="rectangle">
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#03bef3" android:endColor="#0c5ce8" android:angle="45" />
|
||||
<corners android:topLeftRadius="2dp" android:topRightRadius="0dp" android:bottomLeftRadius="2dp" android:bottomRightRadius="0dp" />
|
||||
</shape></item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#ff043683" />
|
||||
<corners android:topLeftRadius="0dp" android:topRightRadius="2dp" android:bottomLeftRadius="0dp" android:bottomRightRadius="2dp" />
|
||||
</shape></item>
|
||||
|
||||
</selector>
|
||||
32
app/src/main/res/drawable/fm_card_map_down_status_bg.xml
Normal file
32
app/src/main/res/drawable/fm_card_map_down_status_bg.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false">
|
||||
<shape>
|
||||
<stroke android:width="1.1dp" android:color="@color/cv_gray_153" />
|
||||
<solid android:color="@color/cv_gray_153" />
|
||||
<padding android:bottom="@dimen/default_widget_padding" android:left="@dimen/default_widget_padding" android:right="@dimen/default_widget_padding" android:top="@dimen/default_widget_padding"></padding>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<stroke android:width="1.1dp" android:color="@color/white" />
|
||||
<solid android:color="@color/white" />
|
||||
<padding android:bottom="@dimen/default_widget_padding" android:left="@dimen/default_widget_padding" android:right="@dimen/default_widget_padding" android:top="@dimen/default_widget_padding"></padding>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_selected="true">
|
||||
<shape>
|
||||
<stroke android:width="1.1dp" android:color="@color/cvm_red" />
|
||||
<solid android:color="@color/cvm_red" />
|
||||
<padding android:bottom="@dimen/default_widget_padding" android:left="@dimen/default_widget_padding" android:right="@dimen/default_widget_padding" android:top="@dimen/default_widget_padding"></padding>
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape>
|
||||
<stroke android:width="1.1dp" android:color="@color/btn_blue_solid" />
|
||||
<solid android:color="@color/transp" />
|
||||
<padding android:bottom="@dimen/default_widget_padding" android:left="@dimen/default_widget_padding" android:right="@dimen/default_widget_padding" android:top="@dimen/default_widget_padding"></padding>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</selector>
|
||||
@@ -2,17 +2,17 @@
|
||||
<layout 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"
|
||||
tools:context=".ui.activity.LoginActivity">
|
||||
tools:context=".ui.activity.login.LoginActivity">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="activity"
|
||||
type="com.navinfo.omqs.ui.activity.LoginActivity" />
|
||||
type="com.navinfo.omqs.ui.activity.login.LoginActivity" />
|
||||
|
||||
<variable
|
||||
name="loginUserModel"
|
||||
type="com.navinfo.omqs.ui.activity.LoginViewModel" />
|
||||
type="com.navinfo.omqs.ui.activity.login.LoginViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
<layout 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"
|
||||
tools:context=".ui.activity.MainActivity">
|
||||
tools:context=".ui.activity.map.MainActivity">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="mainActivity"
|
||||
type="com.navinfo.omqs.ui.activity.MainActivity" />
|
||||
type="com.navinfo.omqs.ui.activity.map.MainActivity" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.navinfo.omqs.ui.activity.MainViewModel" />
|
||||
type="com.navinfo.omqs.ui.activity.map.MainViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
@@ -27,15 +27,14 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:mainActivity="@{mainActivity}"
|
||||
app:viewModel="@{viewModel}"/>
|
||||
app:viewModel="@{viewModel}" />
|
||||
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="wrap_content"
|
||||
<fragment
|
||||
android:id="@+id/main_activity_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="left"
|
||||
android:fitsSystemWindows="true"
|
||||
app:headerLayout="@layout/nav_header_main"
|
||||
app:menu="@menu/activity_main_drawer" />
|
||||
app:navGraph="@navigation/nav_graph" />
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
</layout>
|
||||
82
app/src/main/res/layout/adapter_offline_map_city.xml
Normal file
82
app/src/main/res/layout/adapter_offline_map_city.xml
Normal file
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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"
|
||||
tools:context="com.navinfo.omqs.ui.fragment.offlinemap.OfflineMapCityListAdapter">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="com.navinfo.omqs.R" />
|
||||
|
||||
<variable
|
||||
name="cityBean"
|
||||
type="com.navinfo.omqs.bean.OfflineMapCityBean" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:background="@color/cv_bg_color">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/offline_map_city_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{cityBean.name}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/default_font_size"
|
||||
app:layout_constraintLeft_toLeftOf="@id/offline_map_city_size"
|
||||
app:layout_constraintRight_toRightOf="@id/offline_map_city_size"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/offline_map_city_size"
|
||||
style="@style/map_size_font_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@mipmap/point_blue"
|
||||
android:textSize="@dimen/card_title_font_3size"
|
||||
android:text="@{cityBean.getFileSizeText()}"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/offline_map_city_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_city_list_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="true"
|
||||
android:focusable="false"
|
||||
android:shadowColor="@android:color/transparent"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/card_title_font_2size"
|
||||
app:layout_constraintBottom_toBottomOf="@id/offline_map_download_btn"
|
||||
app:layout_constraintRight_toLeftOf="@id/offline_map_download_btn"
|
||||
app:layout_constraintTop_toTopOf="@id/offline_map_download_btn" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/offline_map_download_btn"
|
||||
style="@style/map_download_style_btn"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:shadowColor="@android:color/transparent"
|
||||
android:text="下载"
|
||||
android:textColor="@color/btn_blue_solid"
|
||||
android:textSize="@dimen/card_title_font_2size"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/offline_map_progress"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.navinfo.omqs.ui.widget.MyProgressBar
|
||||
android:layout_marginTop="5dp"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/offline_map_progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:max="100"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_host_fragment_content_main"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:defaultNavHost="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navGraph="@navigation/nav_graph" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView 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.fragment.FirstFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_first"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/next"
|
||||
app:layout_constraintBottom_toTopOf="@id/textview_first"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textview_first"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/lorem_ipsum"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/button_first" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
99
app/src/main/res/layout/fragment_map_download.xml
Normal file
99
app/src/main/res/layout/fragment_map_download.xml
Normal file
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#000000"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
style="@style/title_default_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#553C3F41">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingBottom="@dimen/default_widget_padding"
|
||||
android:paddingLeft="@dimen/default_widget_padding"
|
||||
android:paddingRight="@dimen/default_widget_padding"
|
||||
android:paddingTop="@dimen/default_widget_padding"
|
||||
android:src="@drawable/btn_back_xml" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_city"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_manager"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/fm_card_map_btn_bg_line"
|
||||
android:button="@null"
|
||||
android:drawableLeft="@null"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="@dimen/default_widget_padding"
|
||||
android:paddingLeft="@dimen/default_widget_padding"
|
||||
android:paddingRight="@dimen/default_widget_padding"
|
||||
android:paddingTop="@dimen/default_widget_padding"
|
||||
android:text="下载管理"
|
||||
android:textColor="@color/btn_blue_white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_city_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/fm_card_map_btn_bg_line"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:drawableLeft="@null"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="@dimen/default_widget_padding"
|
||||
android:paddingLeft="@dimen/default_widget_padding"
|
||||
android:paddingRight="@dimen/default_widget_padding"
|
||||
android:paddingTop="@dimen/default_widget_padding"
|
||||
android:text="城市列表"
|
||||
android:textColor="@color/btn_blue_white"
|
||||
android:textSize="18sp" />
|
||||
</RadioGroup>
|
||||
</RelativeLayout>
|
||||
<EditText
|
||||
android:id="@+id/edt_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/input_blue_type"
|
||||
android:hint="搜索"></EditText>
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<TextView
|
||||
android:id="@+id/tv_map_download_network_hint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:visibility="gone"
|
||||
android:text="网络错误,请检查网络后重试"></TextView>
|
||||
<!-- <com.yanzhenjie.recyclerview.SwipeRecyclerView-->
|
||||
<!-- android:id="@+id/lv_map_manager"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:visibility="invisible"-->
|
||||
<!-- android:layout_height="match_parent">-->
|
||||
<!-- </com.yanzhenjie.recyclerview.SwipeRecyclerView>-->
|
||||
<!-- <com.yanzhenjie.recyclerview.SwipeRecyclerView-->
|
||||
<!-- android:id="@+id/lv_map_city"-->
|
||||
<!-- android:visibility="visible"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent">-->
|
||||
<!-- </com.yanzhenjie.recyclerview.SwipeRecyclerView>-->
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
54
app/src/main/res/layout/fragment_offline_map.xml
Normal file
54
app/src/main/res/layout/fragment_offline_map.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?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"
|
||||
android:background="@color/design_default_color_background"
|
||||
tools:context=".ui.fragment.offlinemap.OfflineMapFragment">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/offline_map_tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/default_blue"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="下载管理" />
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="城市列表" />
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/offline_map_search"
|
||||
style="@style/input_blue_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="搜索"
|
||||
app:layout_constraintTop_toBottomOf="@id/offline_map_tab_layout" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/offline_map_viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/offline_map_search" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/offline_map_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:padding="10dp"
|
||||
android:src="@mipmap/icon_back_n"
|
||||
app:layout_constraintBottom_toBottomOf="@id/offline_map_tab_layout"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/offline_map_tab_layout" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
13
app/src/main/res/layout/fragment_offline_map_city_list.xml
Normal file
13
app/src/main/res/layout/fragment_offline_map_city_list.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?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.fragment.offlinemap.OfflineMapCityListFragment">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/offline_map_city_list_recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
18
app/src/main/res/layout/fragment_offline_map_state_list.xml
Normal file
18
app/src/main/res/layout/fragment_offline_map_state_list.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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"
|
||||
android:background="@color/default_red"
|
||||
tools:context=".ui.fragment.offlinemap.OfflineMapStateListFragment">
|
||||
|
||||
<TextView
|
||||
android:text="第一页"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
11
app/src/main/res/layout/fragment_personal_center.xml
Normal file
11
app/src/main/res/layout/fragment_personal_center.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.navigation.NavigationView 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"
|
||||
android:layout_gravity="left"
|
||||
android:fitsSystemWindows="true"
|
||||
app:headerLayout="@layout/personal_center_head"
|
||||
app:menu="@menu/personal_center_menu" />
|
||||
@@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView 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.fragment.SecondFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_second"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/previous"
|
||||
app:layout_constraintBottom_toTopOf="@id/textview_second"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textview_second"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/lorem_ipsum"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/button_second" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -6,17 +6,17 @@
|
||||
<data>
|
||||
<variable
|
||||
name="mainActivity"
|
||||
type="com.navinfo.omqs.ui.activity.MainActivity" />
|
||||
type="com.navinfo.omqs.ui.activity.map.MainActivity" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.navinfo.omqs.ui.activity.MainViewModel" />
|
||||
type="com.navinfo.omqs.ui.activity.map.MainViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.activity.MainActivity">
|
||||
tools:context=".ui.activity.map.MainActivity">
|
||||
|
||||
<com.navinfo.collect.library.map.NIMapView
|
||||
android:id="@+id/main_activity_map"
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:showIn="navigation_view">
|
||||
|
||||
<group android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/nav_home"
|
||||
android:icon="@drawable/icon_map_zoom_in"
|
||||
android:title="menu_home" />
|
||||
<item
|
||||
android:id="@+id/nav_gallery"
|
||||
android:icon="@drawable/icon_map_zoom_in"
|
||||
android:title="menu_gallery" />
|
||||
<item
|
||||
android:id="@+id/nav_slideshow"
|
||||
android:icon="@drawable/icon_map_zoom_in"
|
||||
android:title="menu_slideshow" />
|
||||
</group>
|
||||
</menu>
|
||||
@@ -1,10 +0,0 @@
|
||||
<menu 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"
|
||||
tools:context="com.navinfo.omqs.ui.activity.MainActivity">
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/action_settings"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
||||
42
app/src/main/res/menu/personal_center_menu.xml
Normal file
42
app/src/main/res/menu/personal_center_menu.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:showIn="navigation_view">
|
||||
|
||||
<group
|
||||
android:id="@+id/group1"
|
||||
android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/personal_center_menu_offline_map"
|
||||
android:icon="@drawable/baseline_map_24"
|
||||
android:title="离线地图" />
|
||||
<item
|
||||
android:id="@+id/personal_center_menu_offline_map1"
|
||||
android:icon="@drawable/baseline_person_24"
|
||||
android:title="menu_gallery" />
|
||||
<item
|
||||
android:id="@+id/personal_center_menu_offline_map2"
|
||||
android:icon="@drawable/baseline_person_24"
|
||||
android:title="menu_slideshow" />
|
||||
</group>
|
||||
<group
|
||||
android:id="@+id/group2"
|
||||
android:checkableBehavior="single">
|
||||
<item android:title="小标题">
|
||||
<menu>
|
||||
<item
|
||||
android:id="@+id/personal_center_menu_offline_map3"
|
||||
android:icon="@drawable/baseline_person_24"
|
||||
android:title="menu_home" />
|
||||
<item
|
||||
android:id="@+id/personal_center_menu_offline_map4"
|
||||
android:icon="@drawable/baseline_person_24"
|
||||
android:title="menu_gallery" />
|
||||
<item
|
||||
android:id="@+id/personal_center_menu_offline_map5"
|
||||
android:icon="@drawable/baseline_person_24"
|
||||
android:title="menu_slideshow" />
|
||||
</menu>
|
||||
</item>
|
||||
</group>
|
||||
</menu>
|
||||
BIN
app/src/main/res/mipmap-xhdpi/icon_back_n.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/icon_back_n.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_back_p.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/icon_back_p.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
app/src/main/res/mipmap-xhdpi/point_blue.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/point_blue.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 123 B |
@@ -3,13 +3,13 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/nav_graph"
|
||||
app:startDestination="@id/FirstFragment">
|
||||
app:startDestination="@id/PersonalCenterFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/FirstFragment"
|
||||
android:name="com.navinfo.omqs.ui.fragment.FirstFragment"
|
||||
android:label="@string/first_fragment_label"
|
||||
tools:layout="@layout/fragment_first">
|
||||
android:id="@+id/PersonalCenterFragment"
|
||||
android:name="com.navinfo.omqs.ui.fragment.personalcenter.PersonalCenterFragment"
|
||||
android:label="@string/personal_center"
|
||||
tools:layout="@layout/fragment_personal_center">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_FirstFragment_to_SecondFragment"
|
||||
@@ -17,12 +17,12 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/SecondFragment"
|
||||
android:name="com.navinfo.omqs.ui.fragment.SecondFragment"
|
||||
android:name="com.navinfo.omqs.ui.fragment.offlinemap.OfflineMapFragment"
|
||||
android:label="@string/second_fragment_label"
|
||||
tools:layout="@layout/fragment_second">
|
||||
tools:layout="@layout/fragment_offline_map">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_SecondFragment_to_FirstFragment"
|
||||
app:destination="@id/FirstFragment" />
|
||||
app:destination="@id/PersonalCenterFragment" />
|
||||
</fragment>
|
||||
</navigation>
|
||||
@@ -2,4 +2,8 @@
|
||||
<resources>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="cv_gray_153">#999999</color>
|
||||
<color name="cvm_red">#FF3B30</color>
|
||||
<color name="cv_bg_color">#553C3F41</color>
|
||||
<color name="btn_blue_solid">#108ee9</color>
|
||||
</resources>
|
||||
@@ -5,4 +5,8 @@
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="nav_header_vertical_spacing">8dp</dimen>
|
||||
<dimen name="nav_header_height">176dp</dimen>
|
||||
<dimen name="default_widget_padding">10dp</dimen>
|
||||
<dimen name="default_font_size" comment="默认字体大小,style中父最顶层">15dp</dimen>
|
||||
<dimen name="card_title_font_2size">13sp</dimen>
|
||||
<dimen name="card_title_font_3size">10sp</dimen>
|
||||
</resources>
|
||||
@@ -2,47 +2,11 @@
|
||||
<string name="app_name">OMQualityInspection</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<!-- Strings used for fragments for navigation -->
|
||||
<string name="first_fragment_label">First Fragment</string>
|
||||
<string name="personal_center">个人中心</string>
|
||||
<string name="second_fragment_label">Second Fragment</string>
|
||||
<string name="next">Next</string>
|
||||
<string name="previous">Previous</string>
|
||||
|
||||
<string name="lorem_ipsum">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam in scelerisque sem. Mauris
|
||||
volutpat, dolor id interdum ullamcorper, risus dolor egestas lectus, sit amet mattis purus
|
||||
dui nec risus. Maecenas non sodales nisi, vel dictum dolor. Class aptent taciti sociosqu ad
|
||||
litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse blandit eleifend
|
||||
diam, vel rutrum tellus vulputate quis. Aliquam eget libero aliquet, imperdiet nisl a,
|
||||
ornare ex. Sed rhoncus est ut libero porta lobortis. Fusce in dictum tellus.\n\n
|
||||
Suspendisse interdum ornare ante. Aliquam nec cursus lorem. Morbi id magna felis. Vivamus
|
||||
egestas, est a condimentum egestas, turpis nisl iaculis ipsum, in dictum tellus dolor sed
|
||||
neque. Morbi tellus erat, dapibus ut sem a, iaculis tincidunt dui. Interdum et malesuada
|
||||
fames ac ante ipsum primis in faucibus. Curabitur et eros porttitor, ultricies urna vitae,
|
||||
molestie nibh. Phasellus at commodo eros, non aliquet metus. Sed maximus nisl nec dolor
|
||||
bibendum, vel congue leo egestas.\n\n
|
||||
Sed interdum tortor nibh, in sagittis risus mollis quis. Curabitur mi odio, condimentum sit
|
||||
amet auctor at, mollis non turpis. Nullam pretium libero vestibulum, finibus orci vel,
|
||||
molestie quam. Fusce blandit tincidunt nulla, quis sollicitudin libero facilisis et. Integer
|
||||
interdum nunc ligula, et fermentum metus hendrerit id. Vestibulum lectus felis, dictum at
|
||||
lacinia sit amet, tristique id quam. Cras eu consequat dui. Suspendisse sodales nunc ligula,
|
||||
in lobortis sem porta sed. Integer id ultrices magna, in luctus elit. Sed a pellentesque
|
||||
est.\n\n
|
||||
Aenean nunc velit, lacinia sed dolor sed, ultrices viverra nulla. Etiam a venenatis nibh.
|
||||
Morbi laoreet, tortor sed facilisis varius, nibh orci rhoncus nulla, id elementum leo dui
|
||||
non lorem. Nam mollis ipsum quis auctor varius. Quisque elementum eu libero sed commodo. In
|
||||
eros nisl, imperdiet vel imperdiet et, scelerisque a mauris. Pellentesque varius ex nunc,
|
||||
quis imperdiet eros placerat ac. Duis finibus orci et est auctor tincidunt. Sed non viverra
|
||||
ipsum. Nunc quis augue egestas, cursus lorem at, molestie sem. Morbi a consectetur ipsum, a
|
||||
placerat diam. Etiam vulputate dignissim convallis. Integer faucibus mauris sit amet finibus
|
||||
convallis.\n\n
|
||||
Phasellus in aliquet mi. Pellentesque habitant morbi tristique senectus et netus et
|
||||
malesuada fames ac turpis egestas. In volutpat arcu ut felis sagittis, in finibus massa
|
||||
gravida. Pellentesque id tellus orci. Integer dictum, lorem sed efficitur ullamcorper,
|
||||
libero justo consectetur ipsum, in mollis nisl ex sed nisl. Donec maximus ullamcorper
|
||||
sodales. Praesent bibendum rhoncus tellus nec feugiat. In a ornare nulla. Donec rhoncus
|
||||
libero vel nunc consequat, quis tincidunt nisl eleifend. Cras bibendum enim a justo luctus
|
||||
vestibulum. Fusce dictum libero quis erat maximus, vitae volutpat diam dignissim.
|
||||
</string>
|
||||
<string name="input_user_name">请输入用户名</string>
|
||||
<string name="input_password">请输入密码</string>
|
||||
<string name="login">登录</string>
|
||||
|
||||
57
app/src/main/res/values/styles.xml
Normal file
57
app/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<resources>
|
||||
|
||||
<style name="title_default_style" comment="默认顶标题样式">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">20dp</item>
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:focusable">true</item>
|
||||
<item name="android:layout_alignParentTop">true</item>
|
||||
<item name="android:background">@color/default_blue</item>
|
||||
<item name="android:paddingBottom">6dp</item>
|
||||
<item name="android:paddingLeft">14dp</item>
|
||||
<item name="android:paddingRight">14dp</item>
|
||||
<item name="android:paddingTop">6dp</item>
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
</style>
|
||||
|
||||
<!-- 默认字体 -->
|
||||
<style name="content_font_default">
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="android:textSize">15dp</item>
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!-- 输入框基本样式 -->
|
||||
<style name="input_blue_type" parent="content_font_default">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:background">#FFFFFF</item>
|
||||
<item name="android:textColor">#1890ff</item>
|
||||
<item name="android:padding">10dp</item>
|
||||
<item name="android:imeOptions">actionDone</item>
|
||||
<item name="android:singleLine">true</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="map_size_font_style" comment="离线地图gdb/nds大小字体样式">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:drawablePadding">4dp</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:textSize">9sp</item>
|
||||
<item name="android:focusable">false</item>
|
||||
<item name="android:clickable">false</item>
|
||||
</style>
|
||||
|
||||
<style name="map_download_style_btn" comment="离线地图下载的按钮样式">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_gravity">center_vertical</item>
|
||||
<item name="android:padding">@dimen/default_widget_padding</item>
|
||||
<item name="android:background">@drawable/fm_card_map_down_status_bg</item>
|
||||
<item name="android:gravity">center_horizontal</item>
|
||||
<item name="android:textColor">@color/btn_blue_white</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user