|
|
|
|
@ -1,99 +1,140 @@
|
|
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
|
|
|
|
<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
|
|
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
limitations under the License.
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:layout_width="fill_parent"
|
|
|
|
|
android:layout_height="fill_parent"
|
|
|
|
|
android:background="@drawable/list_background"
|
|
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
|
|
|
<FrameLayout 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:background="@drawable/list_background">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="fill_parent"
|
|
|
|
|
android:layout_height="fill_parent"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.Toolbar
|
|
|
|
|
android:id="@+id/toolbar"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="?attr/actionBarSize"
|
|
|
|
|
android:background="@color/main_background_gray"
|
|
|
|
|
app:titleTextColor="@color/primary_text_black"
|
|
|
|
|
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/note_title"
|
|
|
|
|
android:layout_width="fill_parent"
|
|
|
|
|
android:layout_height="wrap_content">
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
|
android:padding="8dp">
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/tv_modified_date"
|
|
|
|
|
android:layout_width="0dip"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:layout_gravity="left|center_vertical"
|
|
|
|
|
android:layout_marginRight="8dip"
|
|
|
|
|
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" />
|
|
|
|
|
android:background="@drawable/title_alert"
|
|
|
|
|
android:visibility="gone" />
|
|
|
|
|
|
|
|
|
|
<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="2dip"
|
|
|
|
|
android:layout_marginRight="8dip"
|
|
|
|
|
android:textAppearance="@style/TextAppearanceSecondaryItem" />
|
|
|
|
|
android:layout_marginLeft="2dp"
|
|
|
|
|
android:layout_marginRight="8dp"
|
|
|
|
|
android:textAppearance="@style/TextAppearanceSecondaryItem"
|
|
|
|
|
android:visibility="gone" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
<!-- 新增:撤销按钮 -->
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/btn_undo"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_gravity="center"
|
|
|
|
|
android:background="@drawable/bg_btn_set_color" />
|
|
|
|
|
android:src="@android:drawable/ic_menu_revert"
|
|
|
|
|
android:padding="8dp"
|
|
|
|
|
android:alpha="0.3"
|
|
|
|
|
android:clickable="false" />
|
|
|
|
|
|
|
|
|
|
<!-- 新增:重做按钮 -->
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/btn_redo"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:src="@android:drawable/ic_menu_revert"
|
|
|
|
|
android:scaleX="-1"
|
|
|
|
|
android:padding="8dp"
|
|
|
|
|
android:alpha="0.3"
|
|
|
|
|
android:clickable="false" />
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/btn_set_bg_color"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:src="@drawable/bg_btn_set_color"
|
|
|
|
|
android:padding="5dp"/>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/sv_note_edit"
|
|
|
|
|
android:layout_width="fill_parent"
|
|
|
|
|
android:layout_height="fill_parent"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="0dp"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="fill_parent"
|
|
|
|
|
android:layout_height="7dip"
|
|
|
|
|
android:background="@drawable/bg_color_btn_mask" />
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="7dp"
|
|
|
|
|
android:background="@drawable/bg_color_btn_mask"
|
|
|
|
|
android:visibility="gone" />
|
|
|
|
|
|
|
|
|
|
<ScrollView
|
|
|
|
|
android:layout_width="fill_parent"
|
|
|
|
|
android:layout_height="0dip"
|
|
|
|
|
android:id="@+id/note_scroll_view"
|
|
|
|
|
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="0dip">
|
|
|
|
|
android:overScrollMode="never">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="fill_parent"
|
|
|
|
|
android:layout_height="fill_parent">
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
|
|
<!-- [新增] 图片附件栏容器 -->
|
|
|
|
|
<!-- 放在 NoteEditText 之前,确保它能随页面滚动 -->
|
|
|
|
|
<HorizontalScrollView
|
|
|
|
|
android:id="@+id/attachment_bar_scroll"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:paddingTop="10dp"
|
|
|
|
|
android:paddingBottom="10dp"
|
|
|
|
|
android:clipToPadding="false"
|
|
|
|
|
android:scrollbars="none">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/attachment_bar_container"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:paddingLeft="10dp"
|
|
|
|
|
android:paddingRight="10dp">
|
|
|
|
|
<!-- 图片将动态添加到这里 -->
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</HorizontalScrollView>
|
|
|
|
|
|
|
|
|
|
<net.micode.notes.ui.NoteEditText
|
|
|
|
|
android:id="@+id/note_edit_view"
|
|
|
|
|
android:layout_width="fill_parent"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:gravity="left|top"
|
|
|
|
|
android:gravity="top|left"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:autoLink="all"
|
|
|
|
|
android:autoLink="none"
|
|
|
|
|
android:linksClickable="false"
|
|
|
|
|
android:minLines="12"
|
|
|
|
|
android:textAppearance="@style/TextAppearancePrimaryItem"
|
|
|
|
|
@ -101,145 +142,246 @@
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/note_edit_list"
|
|
|
|
|
android:layout_width="fill_parent"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:layout_marginLeft="-10dip"
|
|
|
|
|
android:layout_marginLeft="-10dp"
|
|
|
|
|
android:visibility="gone" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</ScrollView>
|
|
|
|
|
|
|
|
|
|
<!-- [位置确认] 工具栏必须在 ScrollView 之外,LinearLayout 之内 -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/bottom_toolbar"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="56dp"
|
|
|
|
|
android:background="#F5F5F5"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
|
android:elevation="8dp">
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_insert_image"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
|
|
|
android:src="@android:drawable/ic_menu_gallery" /> <!-- 改用你刚生成的本地图标 -->
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/btn_toggle_list"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
|
|
|
android:src="@android:drawable/checkbox_off_background" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
android:id="@+id/btn_format_text"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
|
|
|
android:src="@android:drawable/ic_menu_edit" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 在原有 bottom_toolbar 同级位置添加 -->
|
|
|
|
|
<HorizontalScrollView
|
|
|
|
|
android:id="@+id/format_toolbar"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="56dp"
|
|
|
|
|
android:background="#F8F8F8"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:scrollbars="none"
|
|
|
|
|
android:elevation="8dp">
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
|
android:paddingLeft="8dp"
|
|
|
|
|
android:paddingRight="8dp">
|
|
|
|
|
|
|
|
|
|
<!-- 字体大小组 -->
|
|
|
|
|
<Button android:id="@+id/btn_font_small" android:layout_width="50dp" android:layout_height="wrap_content" android:text="S" android:textColor="#333333" android:textSize="10sp" style="?android:attr/borderlessButtonStyle"/>
|
|
|
|
|
<Button android:id="@+id/btn_font_normal" android:layout_width="50dp" android:layout_height="wrap_content" android:text="M" android:textColor="#333333" android:textSize="14sp" style="?android:attr/borderlessButtonStyle"/>
|
|
|
|
|
<Button android:id="@+id/btn_font_large" android:layout_width="50dp" android:layout_height="wrap_content" android:text="L" android:textColor="#333333" android:textSize="18sp" style="?android:attr/borderlessButtonStyle"/>
|
|
|
|
|
<Button android:id="@+id/btn_font_super" android:layout_width="50dp" android:layout_height="wrap_content" android:text="XL" android:textColor="#333333" android:textSize="22sp" style="?android:attr/borderlessButtonStyle"/>
|
|
|
|
|
|
|
|
|
|
<View android:layout_width="1dp" android:layout_height="30dp" android:background="#DDD"/>
|
|
|
|
|
|
|
|
|
|
<!-- 样式组 -->
|
|
|
|
|
<ImageButton android:id="@+id/btn_bold" android:layout_width="48dp" android:layout_height="48dp" android:src="@android:drawable/ic_menu_edit" android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="加粗"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_italic" android:layout_width="48dp" android:layout_height="48dp" android:src="@android:drawable/ic_menu_compass" android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="斜体"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_underline" android:layout_width="48dp" android:layout_height="48dp" android:src="@android:drawable/ic_menu_sort_alphabetically" android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="下划线"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_strike" android:layout_width="48dp" android:layout_height="48dp" android:src="@android:drawable/ic_menu_close_clear_cancel" android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="中划线/清除"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_highlight" android:layout_width="48dp" android:layout_height="48dp" android:src="@android:drawable/ic_menu_view" android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="高亮"/>
|
|
|
|
|
<ImageButton android:id="@+id/btn_color_toggle" android:layout_width="48dp" android:layout_height="48dp" android:src="@android:drawable/button_onoff_indicator_on" android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="切换黑白颜色"/>
|
|
|
|
|
|
|
|
|
|
<View android:layout_width="1dp" android:layout_height="30dp" android:background="#DDD"/>
|
|
|
|
|
|
|
|
|
|
<!-- 关闭按钮 -->
|
|
|
|
|
<ImageButton android:id="@+id/btn_close_format" android:layout_width="48dp" android:layout_height="48dp" android:src="@android:drawable/ic_menu_close_clear_cancel" android:background="?attr/selectableItemBackgroundBorderless"/>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</HorizontalScrollView>
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="fill_parent"
|
|
|
|
|
android:layout_height="7dip"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="7dp"
|
|
|
|
|
android:background="@drawable/bg_color_btn_mask" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/btn_set_bg_color"
|
|
|
|
|
android:layout_height="43dip"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:background="@drawable/bg_color_btn_mask"
|
|
|
|
|
android:layout_gravity="top|right" />
|
|
|
|
|
|
|
|
|
|
<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="30dip"
|
|
|
|
|
android:layout_marginRight="8dip"
|
|
|
|
|
android:layout_height="60dp"
|
|
|
|
|
android:background="@android:drawable/dialog_holo_light_frame"
|
|
|
|
|
android:layout_marginTop="?attr/actionBarSize"
|
|
|
|
|
android:layout_marginRight="8dp"
|
|
|
|
|
android:layout_gravity="top|right"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:weightSum="6"
|
|
|
|
|
android:paddingLeft="10dp"
|
|
|
|
|
android:paddingRight="10dp"
|
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
|
android:visibility="gone">
|
|
|
|
|
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:layout_width="0dip"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_weight="1">
|
|
|
|
|
|
|
|
|
|
<!-- 1. 黄色 -->
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:layout_width="48dp"
|
|
|
|
|
android:layout_height="match_parent">
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_bg_yellow"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent" />
|
|
|
|
|
|
|
|
|
|
android:layout_width="38dp"
|
|
|
|
|
android:layout_height="38dp"
|
|
|
|
|
android:layout_gravity="center"
|
|
|
|
|
android:scaleType="fitCenter"
|
|
|
|
|
android:src="@drawable/edit_yellow" />
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_bg_yellow_select"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_width="18dp"
|
|
|
|
|
android:layout_height="18dp"
|
|
|
|
|
android:layout_gravity="bottom|right"
|
|
|
|
|
android:layout_marginRight="5dip"
|
|
|
|
|
android:focusable="false"
|
|
|
|
|
android:layout_marginBottom="8dp"
|
|
|
|
|
android:layout_marginRight="4dp"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:src="@drawable/selected" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 2. 蓝色 -->
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:layout_width="0dip"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_weight="1">
|
|
|
|
|
|
|
|
|
|
android:layout_width="48dp"
|
|
|
|
|
android:layout_height="match_parent">
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_bg_blue"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent" />
|
|
|
|
|
|
|
|
|
|
android:layout_width="38dp"
|
|
|
|
|
android:layout_height="38dp"
|
|
|
|
|
android:layout_gravity="center"
|
|
|
|
|
android:scaleType="fitCenter"
|
|
|
|
|
android:src="@drawable/edit_blue" />
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_bg_blue_select"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_width="18dp"
|
|
|
|
|
android:layout_height="18dp"
|
|
|
|
|
android:layout_gravity="bottom|right"
|
|
|
|
|
android:focusable="false"
|
|
|
|
|
android:layout_marginBottom="8dp"
|
|
|
|
|
android:layout_marginRight="4dp"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:layout_marginRight="3dip"
|
|
|
|
|
android:src="@drawable/selected" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 3. 白色 -->
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:layout_width="0dip"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_weight="1">
|
|
|
|
|
|
|
|
|
|
android:layout_width="48dp"
|
|
|
|
|
android:layout_height="match_parent">
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_bg_white"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent" />
|
|
|
|
|
|
|
|
|
|
android:layout_width="38dp"
|
|
|
|
|
android:layout_height="38dp"
|
|
|
|
|
android:layout_gravity="center"
|
|
|
|
|
android:scaleType="fitCenter"
|
|
|
|
|
android:src="@drawable/edit_white" />
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_bg_white_select"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_width="18dp"
|
|
|
|
|
android:layout_height="18dp"
|
|
|
|
|
android:layout_gravity="bottom|right"
|
|
|
|
|
android:focusable="false"
|
|
|
|
|
android:layout_marginBottom="8dp"
|
|
|
|
|
android:layout_marginRight="4dp"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:layout_marginRight="2dip"
|
|
|
|
|
android:src="@drawable/selected" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 4. 绿色 -->
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:layout_width="0dip"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_weight="1">
|
|
|
|
|
|
|
|
|
|
android:layout_width="48dp"
|
|
|
|
|
android:layout_height="match_parent">
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_bg_green"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent" />
|
|
|
|
|
|
|
|
|
|
android:layout_width="38dp"
|
|
|
|
|
android:layout_height="38dp"
|
|
|
|
|
android:layout_gravity="center"
|
|
|
|
|
android:scaleType="fitCenter"
|
|
|
|
|
android:src="@drawable/edit_green" />
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_bg_green_select"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_width="18dp"
|
|
|
|
|
android:layout_height="18dp"
|
|
|
|
|
android:layout_gravity="bottom|right"
|
|
|
|
|
android:focusable="false"
|
|
|
|
|
android:layout_marginBottom="8dp"
|
|
|
|
|
android:layout_marginRight="4dp"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:src="@drawable/selected" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 5. 红色 -->
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:layout_width="0dip"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_weight="1">
|
|
|
|
|
|
|
|
|
|
android:layout_width="48dp"
|
|
|
|
|
android:layout_height="match_parent">
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_bg_red"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent" />
|
|
|
|
|
|
|
|
|
|
android:layout_width="38dp"
|
|
|
|
|
android:layout_height="38dp"
|
|
|
|
|
android:layout_gravity="center"
|
|
|
|
|
android:scaleType="fitCenter"
|
|
|
|
|
android:src="@drawable/edit_red" />
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_bg_red_select"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_width="18dp"
|
|
|
|
|
android:layout_height="18dp"
|
|
|
|
|
android:layout_gravity="bottom|right"
|
|
|
|
|
android:focusable="false"
|
|
|
|
|
android:layout_marginBottom="8dp"
|
|
|
|
|
android:layout_marginRight="4dp"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:src="@drawable/selected" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 6. 自定义图片按钮 -->
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:layout_width="48dp"
|
|
|
|
|
android:layout_height="match_parent">
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/iv_bg_custom"
|
|
|
|
|
android:layout_width="38dp"
|
|
|
|
|
android:layout_height="38dp"
|
|
|
|
|
android:layout_gravity="center"
|
|
|
|
|
android:src="@android:drawable/ic_menu_gallery"
|
|
|
|
|
android:padding="6dp"
|
|
|
|
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
|
|
|
android:scaleType="fitCenter" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/font_size_selector"
|
|
|
|
|
android:layout_width="fill_parent"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:background="@drawable/font_size_selector_bg"
|
|
|
|
|
android:layout_gravity="bottom"
|
|
|
|
|
@ -247,37 +389,33 @@
|
|
|
|
|
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:id="@+id/ll_font_small"
|
|
|
|
|
android:layout_width="0dip"
|
|
|
|
|
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="5dip" />
|
|
|
|
|
|
|
|
|
|
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="6dip"
|
|
|
|
|
android:layout_marginBottom="-7dip"
|
|
|
|
|
android:layout_marginRight="6dp"
|
|
|
|
|
android:layout_marginBottom="-7dp"
|
|
|
|
|
android:focusable="false"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:src="@drawable/selected" />
|
|
|
|
|
@ -285,68 +423,59 @@
|
|
|
|
|
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:id="@+id/ll_font_normal"
|
|
|
|
|
android:layout_width="0dip"
|
|
|
|
|
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="5dip" />
|
|
|
|
|
|
|
|
|
|
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="6dip"
|
|
|
|
|
android:layout_marginBottom="-7dip"
|
|
|
|
|
android:src="@drawable/selected" />
|
|
|
|
|
android:layout_marginRight="6dp"
|
|
|
|
|
android:layout_marginBottom="-7dp"
|
|
|
|
|
android:src="@drawable/selected"
|
|
|
|
|
android:visibility="gone" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:id="@+id/ll_font_large"
|
|
|
|
|
android:layout_width="0dip"
|
|
|
|
|
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="5dip" />
|
|
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
@ -354,37 +483,33 @@
|
|
|
|
|
android:layout_gravity="bottom|right"
|
|
|
|
|
android:focusable="false"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:layout_marginRight="6dip"
|
|
|
|
|
android:layout_marginBottom="-7dip"
|
|
|
|
|
android:layout_marginRight="6dp"
|
|
|
|
|
android:layout_marginBottom="-7dp"
|
|
|
|
|
android:src="@drawable/selected" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
|
|
|
|
|
<FrameLayout
|
|
|
|
|
android:id="@+id/ll_font_super"
|
|
|
|
|
android:layout_width="0dip"
|
|
|
|
|
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="5dip" />
|
|
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
@ -392,9 +517,24 @@
|
|
|
|
|
android:layout_gravity="bottom|right"
|
|
|
|
|
android:focusable="false"
|
|
|
|
|
android:visibility="gone"
|
|
|
|
|
android:layout_marginRight="6dip"
|
|
|
|
|
android:layout_marginBottom="-7dip"
|
|
|
|
|
android:layout_marginRight="6dp"
|
|
|
|
|
android:layout_marginBottom="-7dp"
|
|
|
|
|
android:src="@drawable/selected" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
|
|
|
|
|
<!-- [新增] 字数统计悬浮球 -->
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/tv_char_count"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_gravity="bottom|right"
|
|
|
|
|
android:layout_marginRight="16dp"
|
|
|
|
|
android:layout_marginBottom="74dp"
|
|
|
|
|
android:background="@drawable/bg_char_count"
|
|
|
|
|
android:textColor="@android:color/white"
|
|
|
|
|
android:textSize="12sp"
|
|
|
|
|
android:text="0"
|
|
|
|
|
android:visibility="visible" />
|
|
|
|
|
|
|
|
|
|
</FrameLayout>
|