增加插入图片功能相关的资源文件

pull/8/head
s2_cc 1 month ago
parent 6a8a79b519
commit 43b38729fa

@ -0,0 +1,50 @@
<?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="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/camera_preview_title"
android:textSize="18sp"
android:textStyle="bold"
android:gravity="center"
android:layout_marginBottom="16dp" />
<ImageView
android:id="@+id/preview_image"
android:layout_width="match_parent"
android:layout_height="300dp"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
android:layout_marginBottom="16dp"
android:contentDescription="@string/camera_preview_image" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">
<Button
android:id="@+id/btn_retake"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/camera_retake"
android:layout_marginEnd="8dp" />
<Button
android:id="@+id/btn_confirm"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/camera_confirm"
android:layout_marginStart="8dp" />
</LinearLayout>
</LinearLayout>

@ -0,0 +1,50 @@
<?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="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/image_insert_title"
android:textSize="18sp"
android:textStyle="bold"
android:gravity="center"
android:layout_marginBottom="16dp" />
<Button
android:id="@+id/btn_gallery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/image_insert_gallery"
android:drawableStart="@android:drawable/ic_menu_gallery"
android:drawablePadding="8dp"
android:layout_marginBottom="8dp"
style="?android:attr/borderlessButtonStyle" />
<Button
android:id="@+id/btn_camera"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/image_insert_camera"
android:drawableStart="@android:drawable/ic_menu_camera"
android:drawablePadding="8dp"
android:layout_marginBottom="16dp"
style="?android:attr/borderlessButtonStyle" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"
android:layout_marginBottom="8dp" />
<Button
android:id="@+id/btn_cancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@android:string/cancel"
style="?android:attr/borderlessButtonStyle" />
</LinearLayout>

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:background="@android:color/white"
android:padding="4dp">
<ImageView
android:id="@+id/image_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:maxHeight="400dp"
android:scaleType="fitCenter"
android:contentDescription="@string/image_content_description" />
<ImageButton
android:id="@+id/btn_delete"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_gravity="top|end"
android:layout_margin="8dp"
android:background="@android:drawable/ic_menu_delete"
android:contentDescription="@string/delete_image" />
<TextView
android:id="@+id/tv_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|start"
android:layout_margin="8dp"
android:background="@android:color/holo_blue_light"
android:paddingHorizontal="8dp"
android:paddingVertical="4dp"
android:textColor="@android:color/white"
android:textSize="12sp"
android:visibility="gone" />
</FrameLayout>

@ -85,7 +85,8 @@
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
android:layout_height="wrap_content"
android:orientation="vertical">
<net.micode.notes.ui.NoteEditText
android:id="@+id/note_edit_view"
@ -99,6 +100,14 @@
android:textAppearance="@style/TextAppearancePrimaryItem"
android:lineSpacingMultiplier="1.2" />
<LinearLayout
android:id="@+id/note_attachment_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="16dp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/note_edit_list"
android:layout_width="fill_parent"

@ -16,15 +16,25 @@
-->
<menu
xmlns:android="http://schemas.android.com/apk/res/android">
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_new_note"
android:title="@string/notelist_menu_new"/>
<item
android:id="@+id/menu_insert_image"
android:icon="@android:drawable/ic_menu_camera"
android:title="@string/menu_insert_image"
app:showAsAction="never"
android:orderInCategory="2" />
<item
android:id="@+id/menu_delete"
android:title="@string/menu_delete"/>
android:icon="@android:drawable/ic_menu_delete"
android:title="@string/menu_delete"
app:showAsAction="never"
android:orderInCategory="4" />
<item
android:id="@+id/menu_font_size"

@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Base.Theme.Notesmaster" parent="Theme.Material3.DayNight.NoActionBar">
<style name="Base.Theme.NotesMaster" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your dark theme here. -->
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
</style>

@ -64,6 +64,21 @@
<string name="menu_folder_change_name">Change folder name</string>
<string name="folder_exist">The folder %1$s exist, please rename</string>
<string name="menu_share">Share</string>
<string name="menu_insert_image">Insert image</string>
<string name="image_insert_title">Insert image</string>
<string name="image_insert_gallery">Choose from gallery</string>
<string name="image_insert_camera">Take a photo</string>
<string name="image_content_description">Attachment image</string>
<string name="delete_image">Delete image</string>
<string name="confirm_delete_image">Are you sure you want to delete this image?</string>
<string name="permission_denied">Permission denied, cannot access image</string>
<string name="image_added">Image added successfully</string>
<string name="image_deleted">Image deleted</string>
<string name="failed_to_add_image">Failed to add image</string>
<string name="camera_preview_title">Preview Photo</string>
<string name="camera_preview_image">Preview image</string>
<string name="camera_retake">Retake</string>
<string name="camera_confirm">Confirm</string>
<string name="menu_send_to_desktop">Send to home</string>
<string name="menu_alert">Remind me</string>
<string name="menu_remove_remind">Delete reminder</string>
@ -115,8 +130,7 @@
<string name="preferences_toast_cannot_change_account">Cannot change the account because sync is in progress</string>
<string name="preferences_toast_success_set_accout">%1$s has been set as the sync account</string>
<string name="preferences_bg_random_appear_title">New note background color random</string>
<string name="preferences_elder_mode_title">Elderly Mode</string>
<string name="preferences_elder_mode_summary">Use larger font size for better readability</string>
<string name="preferences_elder_mode_title">Elder mode</string>
<string name="button_delete">Delete</string>
<string name="call_record_folder_name">Call notes</string>

@ -1,9 +1,9 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Base.Theme.Notesmaster" parent="Theme.Material3.DayNight.NoActionBar">
<style name="Base.Theme.NotesMaster" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your light theme here. -->
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
</style>
<style name="Theme.Notesmaster" parent="Base.Theme.Notesmaster" />
<style name="Theme.NotesMaster" parent="Base.Theme.NotesMaster" />
</resources>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-files-path name="external_files" path="." />
<files-path name="files" path="." />
<cache-path name="cache" path="." />
<external-path name="external" path="." />
</paths>

@ -29,7 +29,6 @@
<CheckBoxPreference
android:key="pref_key_elder_mode"
android:title="@string/preferences_elder_mode_title"
android:summary="@string/preferences_elder_mode_summary"
android:defaultValue="false" />
</PreferenceCategory>
</PreferenceScreen>

Loading…
Cancel
Save