页面布局控件属性

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>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值