diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-03-17 22:38:21 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-03-17 22:38:21 +0000 |
commit | edc370ff7dfe13915247cc5f60dec61654ad8fed (patch) | |
tree | bbd4672302cb375a5a1489fabad0dd9c589759d3 /app/src/main/res | |
parent | 41daebf702f150d7f3df0fa722d2c749931d859e (diff) | |
download | infinity-for-reddit-edc370ff7dfe13915247cc5f60dec61654ad8fed.tar infinity-for-reddit-edc370ff7dfe13915247cc5f60dec61654ad8fed.tar.gz infinity-for-reddit-edc370ff7dfe13915247cc5f60dec61654ad8fed.tar.bz2 infinity-for-reddit-edc370ff7dfe13915247cc5f60dec61654ad8fed.tar.lz infinity-for-reddit-edc370ff7dfe13915247cc5f60dec61654ad8fed.tar.xz infinity-for-reddit-edc370ff7dfe13915247cc5f60dec61654ad8fed.tar.zst infinity-for-reddit-edc370ff7dfe13915247cc5f60dec61654ad8fed.zip |
Add superscript to MarkdownBottomBarRecyclerViewAdapter.
Diffstat (limited to 'app/src/main/res')
4 files changed, 29 insertions, 4 deletions
diff --git a/app/src/main/res/drawable/ic_superscript_24dp.xml b/app/src/main/res/drawable/ic_superscript_24dp.xml new file mode 100644 index 00000000..616bf137 --- /dev/null +++ b/app/src/main/res/drawable/ic_superscript_24dp.xml @@ -0,0 +1,5 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp"> + + <path android:fillColor="@android:color/black" android:pathData="M10.51,12.73L7.3,7.72C6.82,6.97 7.35,6 8.23,6h0c0.39,0 0.74,0.2 0.95,0.53l2.76,4.46h0.12l2.74,-4.45C15,6.2 15.36,6 15.75,6h0c0.88,0 1.42,0.98 0.94,1.72l-3.23,5l3.55,5.55C17.5,19.02 16.96,20 16.08,20h0c-0.38,0 -0.74,-0.2 -0.95,-0.52l-3.07,-4.89h-0.12l-3.07,4.89C8.66,19.8 8.31,20 7.92,20h0c-0.88,0 -1.42,-0.97 -0.94,-1.72L10.51,12.73zM23,8.5L23,8.5C23,8.22 22.78,8 22.5,8c0,0 0,0 0,0H20V7h2c0.55,0 1,-0.45 1,-1V5c0,-0.55 -0.45,-1 -1,-1h-2.5C19.22,4 19,4.22 19,4.5v0C19,4.78 19.22,5 19.5,5H22v1h-2c-0.55,0 -1,0.45 -1,1v1c0,0.55 0.45,1 1,1h2.5C22.78,9 23,8.78 23,8.5z"/> + +</vector> diff --git a/app/src/main/res/layout/activity_post_text.xml b/app/src/main/res/layout/activity_post_text.xml index 41bfef50..8ae4fcb4 100644 --- a/app/src/main/res/layout/activity_post_text.xml +++ b/app/src/main/res/layout/activity_post_text.xml @@ -67,6 +67,7 @@ </LinearLayout> <RelativeLayout + android:id="@+id/subreddit_relative_layout_post_text_activity" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingTop="8dp" diff --git a/app/src/main/res/layout/fragment_uploaded_images_bottom_sheet.xml b/app/src/main/res/layout/fragment_uploaded_images_bottom_sheet.xml index f3e96ef5..8c846541 100644 --- a/app/src/main/res/layout/fragment_uploaded_images_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_uploaded_images_bottom_sheet.xml @@ -19,15 +19,26 @@ android:textSize="?attr/font_18" android:textColor="?attr/primaryTextColor" /> - <LinearLayout + <TextView android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="end"> + android:paddingTop="16dp" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:text="@string/uploaded_images_explanation" + android:fontFamily="?attr/font_family" + android:textSize="?attr/font_default" + android:textColor="?attr/secondaryTextColor" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> <com.google.android.material.button.MaterialButton android:id="@+id/capture_button_uploaded_images_bottom_sheet_fragment" - android:layout_width="wrap_content" + android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_weight="1" android:layout_margin="16dp" android:backgroundTint="@color/colorPrimary" android:textColor="#FFFFFF" @@ -35,8 +46,9 @@ <com.google.android.material.button.MaterialButton android:id="@+id/upload_button_uploaded_images_bottom_sheet_fragment" - android:layout_width="wrap_content" + android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_weight="1" android:layout_margin="16dp" android:backgroundTint="@color/colorPrimary" android:textColor="#FFFFFF" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8c2b0890..5dce1f90 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1215,6 +1215,13 @@ <string name="reply">Reply</string> <string name="uploaded_images">Uploaded Images</string> + <string name="uploaded_images_explanation">This is an experimental feature, and here are some things you need to know: + \n1. Uploaded images will not be shown in the text editor, and instead, a piece of text will be inserted as a block, + with a format similar to ![](XXXXX). XXXXX is the image id, and it should not be modified. To add a caption for + your image, simply type between the brackets. Example: ![This is a caption](XXXXX). Note that the caption will be treated + as plain text.\n2. To write a superscript, please use ^(), and put the texts inside the parentheses, instead of only + using a single ^.\n3. This feature converts your markdown to rich text format and some formatting may be lost in the + process.\n4. You cannot edit a submitted post with embedded images in it.</string> <string name="select_image">Select an Image</string> <string name="capture">Capture</string> <string name="uploading_image">Uploading</string> |