diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-05-10 20:47:24 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-05-10 20:47:24 +0300 |
| commit | bc5fd208926c779a1ae912c10b3f446cc2629bea (patch) | |
| tree | 1ab9590f46c817e32b251f8ab3b60763a6951bc8 /org.fox.ttrss/src/main/res | |
| parent | 6c7fec94127e62975e2a5213a3af4010089a9702 (diff) | |
wip bottom appbar
Diffstat (limited to 'org.fox.ttrss/src/main/res')
9 files changed, 76 insertions, 46 deletions
diff --git a/org.fox.ttrss/src/main/res/drawable/baseline_new_label_24.xml b/org.fox.ttrss/src/main/res/drawable/baseline_new_label_24.xml new file mode 100644 index 00000000..3eb7690c --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable/baseline_new_label_24.xml @@ -0,0 +1,5 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp"> + + <path android:fillColor="@android:color/white" android:pathData="M21,12l-4.37,6.16C16.26,18.68 15.65,19 15,19h-3l0,-6H9v-3H3V7c0,-1.1 0.9,-2 2,-2h10c0.65,0 1.26,0.31 1.63,0.84L21,12zM10,15H7v-3H5v3H2v2h3v3h2v-3h3V15z"/> + +</vector> diff --git a/org.fox.ttrss/src/main/res/drawable/baseline_note_add_24.xml b/org.fox.ttrss/src/main/res/drawable/baseline_note_add_24.xml new file mode 100644 index 00000000..e1ffd854 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable/baseline_note_add_24.xml @@ -0,0 +1,5 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp"> + + <path android:fillColor="@android:color/white" android:pathData="M14,2L6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6zM16,16h-3v3h-2v-3L8,16v-2h3v-3h2v3h3v2zM13,9L13,3.5L18.5,9L13,9z"/> + +</vector> diff --git a/org.fox.ttrss/src/main/res/layout/fragment_article.xml b/org.fox.ttrss/src/main/res/layout/fragment_article.xml index e75980b0..5696e889 100755 --- a/org.fox.ttrss/src/main/res/layout/fragment_article.xml +++ b/org.fox.ttrss/src/main/res/layout/fragment_article.xml @@ -14,12 +14,12 @@ <com.otaliastudios.nestedscrollcoordinatorlayout.NestedScrollCoordinatorLayout android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="match_parent"> <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:background="?colorSurfaceContainer" - android:layout_height="match_parent"> + android:layout_height="wrap_content"> <com.google.android.material.card.MaterialCardView app:layout_scrollFlags="scroll|enterAlways" @@ -150,7 +150,7 @@ android:id="@+id/article_content" app:layout_behavior="@string/appbar_scrolling_view_behavior" android:layout_width="match_parent" - android:layout_height="wrap_content" /> + android:layout_height="match_parent" /> </com.otaliastudios.nestedscrollcoordinatorlayout.NestedScrollCoordinatorLayout> diff --git a/org.fox.ttrss/src/main/res/layout/fragment_article_pager.xml b/org.fox.ttrss/src/main/res/layout/fragment_article_pager.xml index 1a687b1d..2f962418 100755 --- a/org.fox.ttrss/src/main/res/layout/fragment_article_pager.xml +++ b/org.fox.ttrss/src/main/res/layout/fragment_article_pager.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<androidx.viewpager.widget.ViewPager +<androidx.viewpager2.widget.ViewPager2 xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/article_pager" android:layout_width="match_parent" diff --git a/org.fox.ttrss/src/main/res/layout/layout_detail_phone.xml b/org.fox.ttrss/src/main/res/layout/layout_detail_phone.xml index 429b27c0..420b6f3a 100644 --- a/org.fox.ttrss/src/main/res/layout/layout_detail_phone.xml +++ b/org.fox.ttrss/src/main/res/layout/layout_detail_phone.xml @@ -2,16 +2,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <com.google.android.material.floatingactionbutton.FloatingActionButton - android:id="@+id/detail_fab" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="end|bottom" - android:visibility="gone" - android:src="@drawable/baseline_open_in_browser_24" - android:layout_margin="16dp" /> + android:layout_height="match_parent"> <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" @@ -25,7 +16,7 @@ android:id="@+id/article_fragment" app:layout_behavior=".util.DetailActivityScrollingViewBehavior" android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="match_parent"> </FrameLayout> <FrameLayout @@ -35,5 +26,22 @@ android:layout_width="0dp"> </FrameLayout> + <com.google.android.material.bottomappbar.BottomAppBar + android:id="@+id/detail_bottom_appbar" + app:backgroundTint="?colorSurfaceContainerHigh" + android:layout_width="match_parent" + android:layout_height="64dp" + android:layout_gravity="bottom" + app:menu="@menu/bottombar_detail" /> + + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/detail_fab" + android:layout_gravity="end|bottom" + android:layout_marginEnd="16dp" + android:layout_marginBottom="38dp" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:srcCompat="@drawable/baseline_open_in_browser_24" /> + </androidx.coordinatorlayout.widget.CoordinatorLayout> diff --git a/org.fox.ttrss/src/main/res/menu/activity_main.xml b/org.fox.ttrss/src/main/res/menu/activity_main.xml index 68dec353..1650f366 100755 --- a/org.fox.ttrss/src/main/res/menu/activity_main.xml +++ b/org.fox.ttrss/src/main/res/menu/activity_main.xml @@ -58,40 +58,14 @@ android:id="@+id/toggle_published" android:icon="@drawable/baseline_rss_feed_24" app:iconTint="?attr/colorControlNormal" - android:title="@string/article_toggle_published"/> - <item - android:id="@+id/toggle_unread" - android:icon="@drawable/baseline_email_24" - app:iconTint="?attr/colorControlNormal" app:showAsAction="ifRoom" - android:title="@string/article_toggle_unread"/> - <item - android:id="@+id/toggle_attachments" - android:icon="@drawable/baseline_attach_file_24" - app:showAsAction="" - android:title="@string/attachments_prompt"/> + android:title="@string/article_toggle_published"/> <item android:id="@+id/share_article" android:icon="@drawable/baseline_share_24" app:iconTint="?attr/colorControlNormal" app:showAsAction="ifRoom" android:title="@string/share_article"/> - <item - android:id="@+id/set_labels" - app:showAsAction="" - android:title="@string/article_set_labels"/> - <item - android:id="@+id/article_set_note" - app:showAsAction="" - android:title="@string/article_set_note"/> - <item - android:id="@+id/article_set_score" - app:showAsAction="" - android:title="@string/set_score"/> - - <item - android:id="@+id/catchup_above" - android:title="@string/article_mark_read_above"/> </group> diff --git a/org.fox.ttrss/src/main/res/menu/bottombar_detail.xml b/org.fox.ttrss/src/main/res/menu/bottombar_detail.xml new file mode 100644 index 00000000..744ae79b --- /dev/null +++ b/org.fox.ttrss/src/main/res/menu/bottombar_detail.xml @@ -0,0 +1,38 @@ +<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> + + <item + android:id="@+id/article_set_score" + app:showAsAction="always" + app:iconTint="?attr/colorControlNormal" + android:icon="@drawable/baseline_trending_flat_24" + android:title="@string/set_score"/> + + <item + android:id="@+id/toggle_unread" + android:icon="@drawable/baseline_email_24" + app:iconTint="?attr/colorControlNormal" + app:showAsAction="always" + android:title="@string/article_toggle_unread"/> + + <item + android:id="@+id/article_set_labels" + app:showAsAction="always" + android:icon="@drawable/baseline_new_label_24" + app:iconTint="?attr/colorControlNormal" + android:title="@string/article_set_labels"/> + + <item + android:id="@+id/article_edit_note" + app:showAsAction="always" + android:icon="@drawable/baseline_note_add_24" + app:iconTint="?attr/colorControlNormal" + android:title="@string/article_edit_note"/> + + <item + android:id="@+id/toggle_attachments" + android:icon="@drawable/baseline_attachment_24" + app:iconTint="?attr/colorControlNormal" + app:showAsAction="always" + android:title="@string/attachments_prompt"/> + +</menu>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/menu/context_headlines.xml b/org.fox.ttrss/src/main/res/menu/context_headlines.xml index dffc9e47..e5a892ab 100644 --- a/org.fox.ttrss/src/main/res/menu/context_headlines.xml +++ b/org.fox.ttrss/src/main/res/menu/context_headlines.xml @@ -18,12 +18,12 @@ app:showAsAction="" android:title="@string/article_mark_read_above"/> <item - android:id="@+id/set_labels" + android:id="@+id/article_set_labels" android:title="@string/article_set_labels"/> <item - android:id="@+id/article_set_note" + android:id="@+id/article_edit_note" app:showAsAction="" - android:title="@string/article_set_note"/> + android:title="@string/article_edit_note"/> <item android:id="@+id/headlines_article_unread" app:showAsAction="" diff --git a/org.fox.ttrss/src/main/res/values/strings.xml b/org.fox.ttrss/src/main/res/values/strings.xml index 0de65e12..6a67013a 100755 --- a/org.fox.ttrss/src/main/res/values/strings.xml +++ b/org.fox.ttrss/src/main/res/values/strings.xml @@ -106,7 +106,7 @@ <string name="dialog_offline_sync_in_progress">Offline sync in progress</string> <string name="dialog_offline_sync_stop">Stop syncing</string> <string name="dialog_offline_sync_continue">Continue</string> - <string name="article_set_note">Publish with note</string> + <string name="article_edit_note">Edit note</string> <string name="dialog_open_preferences">Settings</string> <string name="dialog_need_configure_prompt">Please fill in your tt-rss server information such as URL, login, and password.</string> <!-- <string name="update_headlines">Refresh</string> --> |