|
|
|
|
@ -15,482 +15,258 @@
|
|
|
|
|
limitations under the License.
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<!-- 统一使用Material风格:与列表页面一致 -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
|
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
|
|
android:id="@+id/note_edit_root"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
|
|
|
android:background="@color/background_color">
|
|
|
|
|
|
|
|
|
|
<!-- 统一使用MaterialToolbar(与列表页面一致) -->
|
|
|
|
|
<com.google.android.material.appbar.MaterialToolbar
|
|
|
|
|
android:id="@+id/toolbar"
|
|
|
|
|
<!-- 全屏背景层 -->
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_note_wallpaper"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="?attr/actionBarSize"
|
|
|
|
|
android:background="?attr/colorPrimary"
|
|
|
|
|
app:title="@string/menu_edit_note"
|
|
|
|
|
app:navigationIcon="@android:drawable/ic_menu_close_clear_cancel" />
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:visibility="gone" />
|
|
|
|
|
|
|
|
|
|
<!-- 主内容区域 -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
<View
|
|
|
|
|
android:id="@+id/view_bg_mask"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="0dp"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/note_title"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content">
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:background="#1A000000"
|
|
|
|
|
android:visibility="gone" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/tv_modified_date"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_gravity="left|center_vertical"
|
|
|
|
|
android:layout_marginRight="8dp"
|
|
|
|
|
android:textAppearance="@style/TextAppearanceSecondaryItem" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/tv_char_count"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:layout_gravity="center_vertical"
|
|
|
|
|
android:paddingLeft="5dp"
|
|
|
|
|
android:text="0 字"
|
|
|
|
|
android:textAppearance="@style/TextAppearanceSecondaryItem" />
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_alert_icon"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_gravity="center_vertical"
|
|
|
|
|
android:background="@drawable/title_alert" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/tv_alert_date"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_gravity="center_vertical"
|
|
|
|
|
android:layout_marginLeft="2dp"
|
|
|
|
|
android:layout_marginRight="8dp"
|
|
|
|
|
android:textAppearance="@style/TextAppearanceSecondaryItem" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_gravity="center"
|
|
|
|
|
android:background="@drawable/bg_btn_set_color" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
<!-- 顶部 Toolbar -->
|
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
|
|
|
android:id="@+id/app_bar"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:background="@android:color/transparent"
|
|
|
|
|
app:elevation="0dp">
|
|
|
|
|
|
|
|
|
|
<!-- Title Input Field -->
|
|
|
|
|
<EditText
|
|
|
|
|
android:id="@+id/et_title"
|
|
|
|
|
<com.google.android.material.appbar.MaterialToolbar
|
|
|
|
|
android:id="@+id/toolbar"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:hint="Title"
|
|
|
|
|
android:paddingLeft="15dip"
|
|
|
|
|
android:paddingRight="15dip"
|
|
|
|
|
android:paddingTop="10dip"
|
|
|
|
|
android:paddingBottom="5dip"
|
|
|
|
|
android:singleLine="true"
|
|
|
|
|
android:textSize="18sp"
|
|
|
|
|
android:textStyle="bold"
|
|
|
|
|
android:textColor="@android:color/black"
|
|
|
|
|
android:textColorHint="@android:color/darker_gray" />
|
|
|
|
|
android:layout_height="?attr/actionBarSize"
|
|
|
|
|
android:background="@android:color/transparent"
|
|
|
|
|
app:navigationIcon="@android:drawable/ic_menu_close_clear_cancel"
|
|
|
|
|
app:title="@string/menu_edit_note"
|
|
|
|
|
app:titleTextAppearance="@style/TextAppearance.Material3.TitleMedium" />
|
|
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 编辑区域容器 -->
|
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
|
|
|
android:id="@+id/sv_note_edit_scroll"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:fillViewport="true"
|
|
|
|
|
android:overScrollMode="never"
|
|
|
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/sv_note_edit"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="0dp"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="7dp"
|
|
|
|
|
android:background="@drawable/bg_color_btn_mask" />
|
|
|
|
|
|
|
|
|
|
<ScrollView
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:paddingHorizontal="20dp"
|
|
|
|
|
android:paddingTop="8dp"
|
|
|
|
|
android:paddingBottom="100dp">
|
|
|
|
|
|
|
|
|
|
<!-- 玻璃拟态卡片容器 -->
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
|
|
|
android:id="@+id/cv_editor_surface"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="0dp"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:scrollbars="none"
|
|
|
|
|
android:overScrollMode="never"
|
|
|
|
|
android:layout_gravity="left|top"
|
|
|
|
|
android:fadingEdgeLength="0dp">
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
app:cardCornerRadius="24dp"
|
|
|
|
|
app:cardElevation="0dp"
|
|
|
|
|
app:cardBackgroundColor="#CCFFFFFF"
|
|
|
|
|
app:strokeWidth="0dp">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent">
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:padding="24dp">
|
|
|
|
|
|
|
|
|
|
<!-- 状态与操作行 -->
|
|
|
|
|
<RelativeLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_marginBottom="20dp">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_alignParentStart="true"
|
|
|
|
|
android:layout_centerVertical="true"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/tv_modified_date"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:alpha="0.6"
|
|
|
|
|
android:textColor="@color/text_color_primary"
|
|
|
|
|
android:fontFamily="sans-serif-medium" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/tv_char_count"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_marginTop="2dp"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:alpha="0.4"
|
|
|
|
|
android:textColor="@color/text_color_primary"
|
|
|
|
|
android:text="0 characters" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_alignParentEnd="true"
|
|
|
|
|
android:layout_centerVertical="true"
|
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
|
android:orientation="horizontal">
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_alert_icon"
|
|
|
|
|
android:layout_width="18dp"
|
|
|
|
|
android:layout_height="18dp"
|
|
|
|
|
android:src="@drawable/title_alert"
|
|
|
|
|
android:tint="@color/fab_color"
|
|
|
|
|
android:visibility="gone" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/tv_alert_date"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_marginStart="6dp"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:textColor="@color/fab_color"
|
|
|
|
|
android:visibility="gone" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_set_bg_color"
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:layout_marginStart="8dp"
|
|
|
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
|
|
|
android:src="@drawable/bg_btn_set_color"
|
|
|
|
|
android:padding="8dp"
|
|
|
|
|
android:scaleType="centerInside" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</RelativeLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 标题输入 -->
|
|
|
|
|
<EditText
|
|
|
|
|
android:id="@+id/et_title"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:hint="Note Title"
|
|
|
|
|
android:paddingVertical="8dp"
|
|
|
|
|
android:singleLine="true"
|
|
|
|
|
android:textSize="28sp"
|
|
|
|
|
android:textStyle="bold"
|
|
|
|
|
android:fontFamily="sans-serif-black"
|
|
|
|
|
android:textColor="@color/text_color_primary"
|
|
|
|
|
android:textColorHint="#4D000000" />
|
|
|
|
|
|
|
|
|
|
<View
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="4dp"
|
|
|
|
|
android:background="#21000000"
|
|
|
|
|
android:layout_marginTop="12dp"
|
|
|
|
|
android:layout_marginBottom="24dp" />
|
|
|
|
|
|
|
|
|
|
<!-- 正文编辑 -->
|
|
|
|
|
<net.micode.notes.ui.NoteEditText
|
|
|
|
|
android:id="@+id/note_edit_view"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:gravity="left|top"
|
|
|
|
|
android:gravity="top"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:autoLink="all"
|
|
|
|
|
android:linksClickable="false"
|
|
|
|
|
android:minLines="12"
|
|
|
|
|
android:textAppearance="@style/TextAppearancePrimaryItem"
|
|
|
|
|
android:lineSpacingMultiplier="1.2" />
|
|
|
|
|
android:textSize="18sp"
|
|
|
|
|
android:textColor="@color/text_color_primary"
|
|
|
|
|
android:lineSpacingMultiplier="1.5"
|
|
|
|
|
android:fontFamily="sans-serif" />
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/note_edit_list"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:layout_marginLeft="-10dp"
|
|
|
|
|
android:visibility="gone" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</ScrollView>
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="7dp"
|
|
|
|
|
android:background="@drawable/bg_color_btn_mask" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/btn_set_bg_color"
|
|
|
|
|
android:layout_height="43dp"
|
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
|
|
|
|
|
|
<!-- 底部悬浮富文本工具栏 -->
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
|
|
|
android:id="@+id/rich_text_selector"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_gravity="bottom|center_horizontal"
|
|
|
|
|
android:layout_marginBottom="24dp"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
app:cardCornerRadius="30dp"
|
|
|
|
|
app:cardElevation="8dp"
|
|
|
|
|
app:cardBackgroundColor="#F0FFFFFF"
|
|
|
|
|
app:strokeWidth="0.5dp"
|
|
|
|
|
app:strokeColor="#1A000000">
|
|
|
|
|
|
|
|
|
|
<HorizontalScrollView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:background="@drawable/bg_color_btn_mask"
|
|
|
|
|
android:layout_gravity="top|right" />
|
|
|
|
|
android:layout_height="56dp"
|
|
|
|
|
android:scrollbars="none">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/note_bg_color_selector"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:background="@drawable/note_edit_color_selector_panel"
|
|
|
|
|
android:layout_marginTop="30dp"
|
|
|
|
|
android:layout_marginRight="8dp"
|
|
|
|
|
android:layout_gravity="top|right"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:orientation="horizontal">
|
|
|
|
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
|
|
android:id="@+id/rv_bg_color_selector"
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/font_size_selector"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:background="@drawable/font_size_selector_bg"
|
|
|
|
|
android:layout_gravity="bottom"
|
|
|
|
|
android:visibility="gone">
|
|
|
|
|
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:id="@+id/ll_font_small"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_weight="1">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:layout_gravity="center"
|
|
|
|
|
android:gravity="center">
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:src="@drawable/font_small"
|
|
|
|
|
android:layout_marginBottom="5dp" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@string/menu_font_small"
|
|
|
|
|
android:textAppearance="@style/TextAppearanceUnderMenuIcon" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_small_select"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_gravity="bottom|right"
|
|
|
|
|
android:layout_marginRight="6dp"
|
|
|
|
|
android:layout_marginBottom="-7dp"
|
|
|
|
|
android:focusable="false"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:src="@drawable/selected" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:id="@+id/ll_font_normal"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_weight="1">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:layout_gravity="center"
|
|
|
|
|
android:gravity="center">
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:src="@drawable/font_normal"
|
|
|
|
|
android:layout_marginBottom="5dp" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@string/menu_font_normal"
|
|
|
|
|
android:textAppearance="@style/TextAppearanceUnderMenuIcon" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_medium_select"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_gravity="bottom|right"
|
|
|
|
|
android:focusable="false"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:layout_marginRight="6dp"
|
|
|
|
|
android:layout_marginBottom="-7dp"
|
|
|
|
|
android:src="@drawable/selected" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:id="@+id/ll_font_large"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_weight="1">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:layout_gravity="center"
|
|
|
|
|
android:gravity="center">
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:src="@drawable/font_large"
|
|
|
|
|
android:layout_marginBottom="5dp" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@string/menu_font_large"
|
|
|
|
|
android:textAppearance="@style/TextAppearanceUnderMenuIcon" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_large_select"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_gravity="bottom|right"
|
|
|
|
|
android:focusable="false"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:layout_marginRight="6dp"
|
|
|
|
|
android:layout_marginBottom="-7dp"
|
|
|
|
|
android:src="@drawable/selected" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:id="@+id/ll_font_super"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_weight="1">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:layout_gravity="center"
|
|
|
|
|
android:gravity="center">
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:src="@drawable/font_super"
|
|
|
|
|
android:layout_marginBottom="5dp" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@string/menu_font_super"
|
|
|
|
|
android:textAppearance="@style/TextAppearanceUnderMenuIcon" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_super_select"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_gravity="bottom|right"
|
|
|
|
|
android:focusable="false"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:layout_marginRight="6dp"
|
|
|
|
|
android:layout_marginBottom="-7dp"
|
|
|
|
|
android:src="@drawable/selected" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/rich_text_selector"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:background="@drawable/font_size_selector_bg"
|
|
|
|
|
android:layout_gravity="bottom"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
|
|
<HorizontalScrollView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:scrollbars="none">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:padding="8dp">
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_bold"
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:src="@drawable/ic_format_bold"
|
|
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
|
android:contentDescription="Bold"
|
|
|
|
|
android:scaleType="centerInside" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_italic"
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:src="@drawable/ic_format_italic"
|
|
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
|
android:contentDescription="Italic"
|
|
|
|
|
android:scaleType="centerInside" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_underline"
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:src="@drawable/ic_format_underline"
|
|
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
|
android:contentDescription="Underline"
|
|
|
|
|
android:scaleType="centerInside" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_strikethrough"
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:src="@drawable/ic_format_strikethrough"
|
|
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
|
android:contentDescription="Strikethrough"
|
|
|
|
|
android:scaleType="centerInside" />
|
|
|
|
|
|
|
|
|
|
<View
|
|
|
|
|
android:layout_width="1dp"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_marginHorizontal="4dp"
|
|
|
|
|
android:background="#CCCCCC"/>
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_header"
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:src="@drawable/ic_format_header"
|
|
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
|
android:contentDescription="Header"
|
|
|
|
|
android:scaleType="centerInside" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_list"
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:src="@drawable/ic_format_list_bulleted"
|
|
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
|
android:contentDescription="List"
|
|
|
|
|
android:scaleType="centerInside" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_quote"
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:src="@drawable/ic_format_quote"
|
|
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
|
android:contentDescription="Quote"
|
|
|
|
|
android:scaleType="centerInside" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_code"
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:src="@drawable/ic_format_code"
|
|
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
|
android:contentDescription="Code"
|
|
|
|
|
android:scaleType="centerInside" />
|
|
|
|
|
|
|
|
|
|
<View
|
|
|
|
|
android:layout_width="1dp"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_marginHorizontal="4dp"
|
|
|
|
|
android:background="#CCCCCC"/>
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_link"
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:src="@drawable/ic_insert_link"
|
|
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
|
android:contentDescription="Link"
|
|
|
|
|
android:scaleType="centerInside" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_divider"
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:src="@drawable/ic_insert_divider"
|
|
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
|
android:contentDescription="Divider"
|
|
|
|
|
android:scaleType="centerInside" />
|
|
|
|
|
|
|
|
|
|
<View
|
|
|
|
|
android:layout_width="1dp"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_marginHorizontal="4dp"
|
|
|
|
|
android:background="#CCCCCC"/>
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_color_text"
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:src="@drawable/ic_format_color_text"
|
|
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
|
android:contentDescription="Text Color"
|
|
|
|
|
android:scaleType="centerInside" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_color_fill"
|
|
|
|
|
android:layout_width="40dp"
|
|
|
|
|
android:layout_height="40dp"
|
|
|
|
|
android:src="@drawable/ic_format_color_fill"
|
|
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
|
android:contentDescription="Background Color"
|
|
|
|
|
android:scaleType="centerInside" />
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</HorizontalScrollView>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
|
android:paddingHorizontal="12dp">
|
|
|
|
|
|
|
|
|
|
<ImageButton android:id="@+id/btn_bold" android:layout_width="44dp" android:layout_height="44dp" android:src="@drawable/ic_format_bold" android:background="?attr/selectableItemBackgroundBorderless" app:tint="@color/on_primary_color"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_italic" android:layout_width="44dp" android:layout_height="44dp" android:src="@drawable/ic_format_italic" android:background="?attr/selectableItemBackgroundBorderless" app:tint="@color/on_primary_color"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_underline" android:layout_width="44dp" android:layout_height="44dp" android:src="@drawable/ic_format_underline" android:background="?attr/selectableItemBackgroundBorderless" app:tint="@color/on_primary_color"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_strikethrough" android:layout_width="44dp" android:layout_height="44dp" android:src="@drawable/ic_format_strikethrough" android:background="?attr/selectableItemBackgroundBorderless" app:tint="@color/on_primary_color"/>
|
|
|
|
|
|
|
|
|
|
<View android:layout_width="1dp" android:layout_height="24dp" android:background="#1A000000" android:layout_marginHorizontal="8dp"/>
|
|
|
|
|
|
|
|
|
|
<ImageButton android:id="@+id/btn_header" android:layout_width="44dp" android:layout_height="44dp" android:src="@drawable/ic_format_header" android:background="?attr/selectableItemBackgroundBorderless" app:tint="@color/on_primary_color"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_list" android:layout_width="44dp" android:layout_height="44dp" android:src="@drawable/ic_format_list_bulleted" android:background="?attr/selectableItemBackgroundBorderless" app:tint="@color/on_primary_color"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_quote" android:layout_width="44dp" android:layout_height="44dp" android:src="@drawable/ic_format_quote" android:background="?attr/selectableItemBackgroundBorderless" app:tint="@color/on_primary_color"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_code" android:layout_width="44dp" android:layout_height="44dp" android:src="@drawable/ic_format_code" android:background="?attr/selectableItemBackgroundBorderless" app:tint="@color/on_primary_color"/>
|
|
|
|
|
|
|
|
|
|
<View android:layout_width="1dp" android:layout_height="24dp" android:background="#1A000000" android:layout_marginHorizontal="8dp"/>
|
|
|
|
|
|
|
|
|
|
<ImageButton android:id="@+id/btn_link" android:layout_width="44dp" android:layout_height="44dp" android:src="@drawable/ic_insert_link" android:background="?attr/selectableItemBackgroundBorderless" app:tint="@color/on_primary_color"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_divider" android:layout_width="44dp" android:layout_height="44dp" android:src="@drawable/ic_insert_divider" android:background="?attr/selectableItemBackgroundBorderless" app:tint="@color/on_primary_color"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_color_text" android:layout_width="44dp" android:layout_height="44dp" android:src="@drawable/ic_format_color_text" android:background="?attr/selectableItemBackgroundBorderless" app:tint="@color/on_primary_color"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_color_fill" android:layout_width="44dp" android:layout_height="44dp" android:src="@drawable/ic_format_color_fill" android:background="?attr/selectableItemBackgroundBorderless" app:tint="@color/on_primary_color"/>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</HorizontalScrollView>
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
|
|
|
|
|
<!-- 兼容性保留 ID 的隐藏视图 -->
|
|
|
|
|
<View android:id="@+id/note_bg_color_selector" android:layout_width="0dp" android:layout_height="0dp" android:visibility="gone" />
|
|
|
|
|
<View android:id="@+id/font_size_selector" android:layout_width="0dp" android:layout_height="0dp" android:visibility="gone" />
|
|
|
|
|
<View android:id="@+id/ll_font_small" android:layout_width="0dp" android:layout_height="0dp" android:visibility="gone" />
|
|
|
|
|
<View android:id="@+id/ll_font_normal" android:layout_width="0dp" android:layout_height="0dp" android:visibility="gone" />
|
|
|
|
|
<View android:id="@+id/ll_font_large" android:layout_width="0dp" android:layout_height="0dp" android:visibility="gone" />
|
|
|
|
|
<View android:id="@+id/ll_font_super" android:layout_width="0dp" android:layout_height="0dp" android:visibility="gone" />
|
|
|
|
|
<View android:id="@+id/iv_small_select" android:layout_width="0dp" android:layout_height="0dp" android:visibility="gone" />
|
|
|
|
|
<View android:id="@+id/iv_medium_select" android:layout_width="0dp" android:layout_height="0dp" android:visibility="gone" />
|
|
|
|
|
<View android:id="@+id/iv_large_select" android:layout_width="0dp" android:layout_height="0dp" android:visibility="gone" />
|
|
|
|
|
<View android:id="@+id/iv_super_select" android:layout_width="0dp" android:layout_height="0dp" android:visibility="gone" />
|
|
|
|
|
<View android:id="@+id/sv_note_edit" android:layout_width="0dp" android:layout_height="0dp" android:visibility="gone" />
|
|
|
|
|
|
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
|
|
|
|