setting_cover
<?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">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cover">
</View>
</LinearLayout>
setting_layout
<?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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:background="?attr/lvBackground">
<androidx.appcompat.widget.Toolbar
android:id="@+id/my_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:title="弹出菜单"
app:titleTextColor="?attr/titleColor">
</androidx.appcompat.widget.Toolbar>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:clickable="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal"
android:focusable="true"
android:clickable="true">
<ImageView
android:id="@+id/setting_settings_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:src="?attr/settingIcon"
android:layout_gravity="center" />
<TextView
android:id="@+id/setting_settings_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="设置"
android:textColor="?attr/tvMainColor"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:gravity="center"
android:textSize="24dp"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
preference_layout
<?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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:background="?attr/lvBackground">
<androidx.appcompat.widget.Toolbar
android:id="@+id/my_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
app:titleTextColor="?attr/titleColor"
app:title="设置"
android:theme="?attr/toolbarTheme"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_margin="20dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="黑夜模式"
android:textColor="?attr/tvMainColor"
android:textSize="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pref_night_summary"
android:textColor="?attr/tvSubColor"
android:textSize="16dp"/>
</LinearLayout>
<Switch
android:id="@+id/nightMode"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:clickable="true"
android:gravity="center"
android:switchMinWidth="50dp"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:foreground="@color/greyC"/>
</LinearLayout>
edit_layout
<?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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:background="?attr/lvBackground">
<androidx.appcompat.widget.Toolbar
android:id="@+id/edit_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
app:titleTextColor="?attr/titleColor"
app:title="New Note"
android:theme="?attr/toolbarTheme"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
</androidx.appcompat.widget.Toolbar>
<EditText
android:id="@+id/et"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dp"
android:gravity="top"
android:background="@null"
android:textColor="?attr/tvMainColor"
android:textSize="24dp" >
</EditText>
</LinearLayout>
activity_main
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:id="@+id/main_layout"
android:layout_margin="0dp"
android:background="?attr/lvBackground"
tools:context=".MainActivity">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:background="#66000000"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<androidx.appcompat.widget.Toolbar
android:id="@+id/main_toolbar"
android:layout_width="match_parent"
android:background="?attr/colorPrimary"
app:titleTextColor="?attr/titleColor"
android:layout_height="?attr/actionBarSize"
android:theme="?attr/toolbarTheme"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
android:elevation="4dp">
</androidx.appcompat.widget.Toolbar>
<LinearLayout
android:id="@+id/lv_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<ListView
android:id="@+id/lv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/main_toolbar"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="8dp"
android:divider="?attr/lvBackground"
android:dividerHeight="8dp">
</ListView>
</LinearLayout>
<LinearLayout
android:id="@+id/lv_plan_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ListView
android:id="@+id/lv_plan"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="50dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="8dp"
android:layout_below="@+id/my_toolbar"
android:divider="?attr/lvBackground"
android:dividerHeight="8dp"
>
</ListView>
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/emptyView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text=" Take your time ~"
android:textSize="20sp"
android:visibility="gone" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="30dp"
android:layout_marginEnd="40dp"
android:clickable="true"
app:backgroundTint="@color/q"
app:srcCompat="@drawable/ic_baseline_add_24"
tools:ignore="SpeakableTextPresentCheck,SpeakableTextPresentCheck,SpeakableTextPresentCheck,SpeakableTextPresentCheck">
</com.google.android.material.floatingactionbutton.FloatingActionButton>
</RelativeLayout>