fix: 修改离线地图样式
This commit is contained in:
parent
af79ae4146
commit
9495b54a4b
@ -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="@color/white" />
|
||||||
|
<item android:state_pressed="true" android:color="@color/white" />
|
||||||
|
<item android:state_selected="true" android:color="@color/white" />
|
||||||
|
<item android:state_checked="true" android:color="@color/white" />
|
||||||
|
<item android:color="@color/black" />
|
||||||
|
</selector>
|
6
app/src/main/res/drawable/ripple_btn_checked.xml
Normal file
6
app/src/main/res/drawable/ripple_btn_checked.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ripple
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:color="@color/ripple_color">
|
||||||
|
<item android:drawable="@drawable/shape_btn_check"/>
|
||||||
|
</ripple>
|
@ -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:drawable="@drawable/ripple_btn_normal"></item>
|
||||||
|
<item android:state_checked="true" android:drawable="@drawable/ripple_btn_normal"/>
|
||||||
|
<item android:state_pressed="true" android:drawable="@drawable/ripple_btn_normal"/>
|
||||||
|
<item android:state_selected="true" android:drawable="@drawable/ripple_btn_normal"></item>
|
||||||
|
<item android:drawable="@drawable/ripple_btn_checked"/>
|
||||||
|
</selector>
|
8
app/src/main/res/drawable/shape_btn_check.xml
Normal file
8
app/src/main/res/drawable/shape_btn_check.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="@color/colorSurface"></solid>
|
||||||
|
<stroke android:color="@color/gray_121" android:width="0.1dp"></stroke>
|
||||||
|
<corners android:radius="30dp" />
|
||||||
|
</shape>
|
@ -4,25 +4,78 @@
|
|||||||
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"
|
||||||
android:background="@color/design_default_color_background"
|
android:background="@color/bg_left_pannel"
|
||||||
tools:context=".ui.fragment.offlinemap.OfflineMapFragment">
|
tools:context=".ui.fragment.offlinemap.OfflineMapFragment">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/title_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
style="@style/left_pannel_title_layout">
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/offline_map_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
android:background="@drawable/selector_bg_round_button"
|
||||||
|
android:foreground="@drawable/ripple_btn_press"
|
||||||
|
style="@style/btn_round"
|
||||||
|
android:src="@drawable/ic_baseline_keyboard_arrow_left_24"></androidx.appcompat.widget.AppCompatImageView>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/left_pannel_title_font"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="离线地图"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"></androidx.appcompat.widget.AppCompatTextView>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/title_layout"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
style="@style/default_card_view">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingVertical="@dimen/default_widget_padding"
|
||||||
|
android:orientation="vertical">
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
android:id="@+id/offline_map_tab_layout"
|
android:id="@+id/offline_map_tab_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/blue"
|
android:background="@color/transparent"
|
||||||
|
app:tabBackground="@drawable/selector_bg_gradient_checkbox"
|
||||||
|
app:tabTextColor="@color/black"
|
||||||
|
app:tabGravity="center"
|
||||||
|
app:tabPadding="0dp"
|
||||||
|
app:tabIndicator="@null"
|
||||||
|
app:tabMode="scrollable"
|
||||||
|
app:tabIndicatorHeight="0dp"
|
||||||
|
app:tabSelectedTextColor="@color/white"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toBottomOf="@id/title_layout">
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabItem
|
<com.google.android.material.tabs.TabItem
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="@dimen/default_widget_padding"
|
||||||
android:text="下载管理" />
|
android:text="下载管理" />
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabItem
|
<com.google.android.material.tabs.TabItem
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="@dimen/default_widget_padding"
|
||||||
android:text="城市列表" />
|
android:text="城市列表" />
|
||||||
</com.google.android.material.tabs.TabLayout>
|
</com.google.android.material.tabs.TabLayout>
|
||||||
|
|
||||||
@ -30,20 +83,9 @@
|
|||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
android:id="@+id/offline_map_viewpager"
|
android:id="@+id/offline_map_viewpager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="match_parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/offline_map_tab_layout" />
|
app:layout_constraintTop_toBottomOf="@id/offline_map_tab_layout" />
|
||||||
|
</LinearLayout>
|
||||||
<ImageView
|
</androidx.cardview.widget.CardView>
|
||||||
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>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -115,6 +115,15 @@
|
|||||||
<item name="android:paddingBottom">1dp</item>
|
<item name="android:paddingBottom">1dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="checked_gradient_color" parent="TextAppearance.AppCompat.Button">
|
||||||
|
<item name="android:textColor">@color/selector_default_text_color_black_enable_white</item>
|
||||||
|
<item name="android:background">@drawable/selector_bg_gradient_checkbox</item>
|
||||||
|
<item name="android:clickable">true</item>
|
||||||
|
<item name="android:focusable">true</item>
|
||||||
|
<item name="android:gravity">center</item>
|
||||||
|
<item name="android:paddingBottom">1dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="fm_btn_default_blue_white" parent="@android:style/Widget.Button">
|
<style name="fm_btn_default_blue_white" parent="@android:style/Widget.Button">
|
||||||
<item name="android:background">@drawable/selector_bg_blue_gray_bg_4_radius</item>
|
<item name="android:background">@drawable/selector_bg_blue_gray_bg_4_radius</item>
|
||||||
<item name="android:textColor">@color/selector_default_text_color_white_enable_gray</item>
|
<item name="android:textColor">@color/selector_default_text_color_white_enable_gray</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user