diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-05-11 11:55:06 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-05-11 11:55:06 +0300 |
| commit | ea2ecf47388e3211f499dea0e10c26047f753341 (patch) | |
| tree | 96e785c5c5f501fa2692154df2712ed61682c494 /org.fox.ttrss/src/main/res | |
| parent | 6c7fec94127e62975e2a5213a3af4010089a9702 (diff) | |
| parent | fd30ab142e6aad2adc7175ebdfab8db25757cf51 (diff) | |
Merge branch 'protected/bottomappbar' into 'master'
wip bottom appbar
See merge request tt-rss/tt-rss-android!30
Diffstat (limited to 'org.fox.ttrss/src/main/res')
19 files changed, 328 insertions, 435 deletions
diff --git a/org.fox.ttrss/src/main/res/drawable/baseline_mark_as_unread_24.xml b/org.fox.ttrss/src/main/res/drawable/baseline_mark_as_unread_24.xml deleted file mode 100644 index 94381df3..00000000 --- a/org.fox.ttrss/src/main/res/drawable/baseline_mark_as_unread_24.xml +++ /dev/null @@ -1,5 +0,0 @@ -<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="M18.83,7h-2.6L10.5,4 4,7.4L4,17c-1.1,0 -2,-0.9 -2,-2L2,7.17c0,-0.53 0.32,-1.09 0.8,-1.34L10.5,2l7.54,3.83c0.43,0.23 0.73,0.7 0.79,1.17zM20,8L7,8c-1.1,0 -2,0.9 -2,2v9c0,1.1 0.9,2 2,2h13c1.1,0 2,-0.9 2,-2v-9c0,-1.1 -0.9,-2 -2,-2zM20,11.67L13.5,15 7,11.67L7,10l6.5,3.33L20,10v1.67z"/> - -</vector> diff --git a/org.fox.ttrss/src/main/res/drawable/baseline_mark_email_unread_24.xml b/org.fox.ttrss/src/main/res/drawable/baseline_mark_email_unread_24.xml new file mode 100644 index 00000000..929f5ece --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable/baseline_mark_email_unread_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="M22,8.98V18c0,1.1 -0.9,2 -2,2H4c-1.1,0 -2,-0.9 -2,-2V6c0,-1.1 0.9,-2 2,-2h10.1C14.04,4.32 14,4.66 14,5c0,1.48 0.65,2.79 1.67,3.71L12,11L4,6v2l8,5l5.3,-3.32C17.84,9.88 18.4,10 19,10C20.13,10 21.16,9.61 22,8.98zM16,5c0,1.66 1.34,3 3,3s3,-1.34 3,-3s-1.34,-3 -3,-3S16,3.34 16,5z"/> + +</vector> 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-sw600dp-land/activity_detail.xml b/org.fox.ttrss/src/main/res/layout-sw600dp-land/activity_detail.xml index 09534bc7..3078f77e 100644 --- a/org.fox.ttrss/src/main/res/layout-sw600dp-land/activity_detail.xml +++ b/org.fox.ttrss/src/main/res/layout-sw600dp-land/activity_detail.xml @@ -57,14 +57,22 @@ app:layout_behavior=".util.DetailActivityScrollingViewBehavior" android:layout_height="match_parent"/> + <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" - android:layout_gravity="end|bottom" - android:visibility="gone" - android:src="@drawable/baseline_open_in_browser_24" - android:layout_margin="16dp" /> + app:srcCompat="@drawable/baseline_open_in_browser_24" /> </androidx.coordinatorlayout.widget.CoordinatorLayout> </LinearLayout> 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..eba96d75 100755 --- a/org.fox.ttrss/src/main/res/layout/fragment_article.xml +++ b/org.fox.ttrss/src/main/res/layout/fragment_article.xml @@ -1,157 +1,145 @@ -<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" +<com.otaliastudios.nestedscrollcoordinatorlayout.NestedScrollCoordinatorLayout + xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" - android:id="@+id/article_fragment" - android:layout_width="fill_parent" android:background="?colorSurfaceContainer" + android:layout_width="match_parent" android:layout_height="match_parent"> - <FrameLayout - android:id="@+id/article_fullscreen_video" - android:visibility="invisible" - android:layout_width="fill_parent" - android:layout_height="fill_parent"/> - - <com.otaliastudios.nestedscrollcoordinatorlayout.NestedScrollCoordinatorLayout + <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" + android:background="?colorSurfaceContainer" android:layout_height="wrap_content"> - <com.google.android.material.appbar.AppBarLayout + <com.google.android.material.card.MaterialCardView + app:layout_scrollFlags="scroll|enterAlways" + app:strokeWidth="0dp" + app:shapeAppearance="@style/ShapeAppearanceArticleHeader" 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" - app:strokeWidth="0dp" - app:shapeAppearance="@style/ShapeAppearanceArticleHeader" - android:layout_width="match_parent" - android:layout_height="wrap_content"> + <LinearLayout + android:id="@+id/article_header" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> <LinearLayout - android:id="@+id/article_header" + android:orientation="horizontal" + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical"> + android:layout_height="match_parent"> - <LinearLayout - android:orientation="horizontal" - android:layout_marginStart="16dp" - android:layout_marginEnd="16dp" + <TextView + android:id="@+id/title" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="wrap_content" + android:layout_weight="1" + android:textColor="?colorPrimary" + tools:text="Unreasonably long article title blah blah blah blah blah blah" + android:textSize="18sp" + android:gravity="start" /> - <TextView - android:id="@+id/title" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_weight="1" - android:textColor="?colorPrimary" - tools:text="Unreasonably long article title blah blah blah blah blah blah" - android:textSize="18sp" - android:gravity="start" /> + </LinearLayout> - </LinearLayout> + <TextView + android:id="@+id/comments" + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" + tools:text="comments" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAlignment="viewStart" + android:layout_weight="1" + android:fontFamily="sans-serif-light" + android:layout_marginTop="8dp" + android:textColor="?colorPrimary" + android:textSize="12sp" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" + android:layout_marginBottom="8dp" + android:layout_marginTop="8dp"> <TextView - android:id="@+id/comments" - android:layout_marginStart="16dp" - android:layout_marginEnd="16dp" - tools:text="comments" - android:layout_width="match_parent" + android:id="@+id/tags" + tools:text="alpha, beta, gamma" + android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_weight="0.7" + android:ellipsize="middle" android:textAlignment="viewStart" - android:layout_weight="1" + android:singleLine="true" android:fontFamily="sans-serif-light" - android:layout_marginTop="8dp" - android:textColor="?colorPrimary" + android:textColor="?colorSecondary" android:textSize="12sp" /> - <LinearLayout - android:layout_width="match_parent" + <TextView + android:id="@+id/date" + tools:text="Jan 01, 1970" + android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="16dp" - android:layout_marginEnd="16dp" - android:layout_marginBottom="8dp" - android:layout_marginTop="8dp"> - - <TextView - android:id="@+id/tags" - tools:text="alpha, beta, gamma" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="0.7" - android:ellipsize="middle" - android:textAlignment="viewStart" - android:singleLine="true" - android:fontFamily="sans-serif-light" - android:textColor="?colorSecondary" - android:textSize="12sp" /> - - <TextView - android:id="@+id/date" - tools:text="Jan 01, 1970" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="0.3" - android:textAlignment="viewEnd" - android:fontFamily="sans-serif-light" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="?colorSecondary" - android:textSize="12sp" /> - - </LinearLayout> - - <LinearLayout + android:layout_weight="0.3" + android:textAlignment="viewEnd" + android:fontFamily="sans-serif-light" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="?colorSecondary" + android:textSize="12sp" /> + + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <com.google.android.material.card.MaterialCardView + android:id="@+id/note_container" android:layout_width="match_parent" - android:layout_height="wrap_content"> + app:cardBackgroundColor="?colorTertiaryContainer" + android:layout_margin="8dp" + app:strokeWidth="0dp" + android:layout_height="match_parent"> - <com.google.android.material.card.MaterialCardView - android:id="@+id/note_container" + <LinearLayout android:layout_width="match_parent" - app:cardBackgroundColor="?colorTertiaryContainer" android:layout_margin="8dp" - app:strokeWidth="0dp" - android:layout_height="match_parent"> + android:layout_height="wrap_content"> - <LinearLayout + <TextView + android:id="@+id/note" + tools:text="Article note (if any...)" + android:layout_gravity="center_vertical" android:layout_width="match_parent" - android:layout_margin="8dp" - android:layout_height="wrap_content"> - - <TextView - android:id="@+id/note" - tools:text="Article note (if any...)" - android:layout_gravity="center_vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginEnd="8dp" - android:textColor="?colorOnTertiaryContainer" - android:layout_weight="1" - android:textSize="12sp"/> - - <ImageView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - app:tint="?colorOnTertiaryContainer" - android:src="@drawable/baseline_note_24"/> - - </LinearLayout> - </com.google.android.material.card.MaterialCardView> - - </LinearLayout> - </LinearLayout> - </com.google.android.material.card.MaterialCardView> + android:layout_height="wrap_content" + android:layout_marginEnd="8dp" + android:textColor="?colorOnTertiaryContainer" + android:layout_weight="1" + android:textSize="12sp"/> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + app:tint="?colorOnTertiaryContainer" + android:src="@drawable/baseline_note_24"/> + + </LinearLayout> + </com.google.android.material.card.MaterialCardView> - </com.google.android.material.appbar.AppBarLayout> + </LinearLayout> + </LinearLayout> + </com.google.android.material.card.MaterialCardView> - <com.telefonica.nestedscrollwebview.NestedScrollWebView - android:id="@+id/article_content" - app:layout_behavior="@string/appbar_scrolling_view_behavior" - android:layout_width="match_parent" - android:layout_height="wrap_content" /> + </com.google.android.material.appbar.AppBarLayout> - </com.otaliastudios.nestedscrollcoordinatorlayout.NestedScrollCoordinatorLayout> + <com.telefonica.nestedscrollwebview.NestedScrollWebView + android:id="@+id/article_content" + app:layout_behavior="@string/appbar_scrolling_view_behavior" + android:layout_width="match_parent" + android:layout_height="match_parent" /> -</FrameLayout>
\ No newline at end of file +</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/fragment_headlines_offline.xml b/org.fox.ttrss/src/main/res/layout/fragment_headlines_offline.xml deleted file mode 100755 index 4ce8c1dd..00000000 --- a/org.fox.ttrss/src/main/res/layout/fragment_headlines_offline.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/headlines_fragment" - android:layout_width="fill_parent" - android:layout_height="fill_parent"> - - <androidx.swiperefreshlayout.widget.SwipeRefreshLayout - android:id="@+id/headlines_swipe_container" - android:layout_width="match_parent" - android:layout_height="match_parent" > - - <ListView - android:id="@+id/headlines_list" - android:background="?colorSurfaceContainer" - android:drawSelectorOnTop="true" - android:padding="8dp" - android:dividerHeight="8dp" - android:divider="@null" - android:layout_width="match_parent" - android:layout_height="match_parent" /> - </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> - -</FrameLayout>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/layout/headlines_row_compact.xml b/org.fox.ttrss/src/main/res/layout/headlines_row_compact.xml index fd328276..352aad91 100755 --- a/org.fox.ttrss/src/main/res/layout/headlines_row_compact.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines_row_compact.xml @@ -4,21 +4,23 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/headlines_row" - android:padding="@dimen/activity_horizontal_margin" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="16dp" + android:paddingEnd="8dp" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - tools:ignore="HardcodedText" > + android:orientation="horizontal"> <FrameLayout - android:layout_marginRight="16dp" - android:layout_gravity="center_vertical|left" + android:layout_gravity="center_vertical|start" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="16dp"> <ImageView android:clickable="true" + android:focusable="true" android:layout_width="48dp" android:layout_height="48dp" android:layout_gravity="center" @@ -36,7 +38,6 @@ <LinearLayout android:layout_weight="1" android:orientation="vertical" - android:layout_gravity="center" android:layout_width="match_parent" android:layout_height="wrap_content"> @@ -44,94 +45,64 @@ android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="center_vertical" - android:textAlignment="viewStart" android:maxLines="2" android:ellipsize="end" tools:text="Sample entry title" android:textColor="?colorPrimary" - android:textSize="18sp" - android:layout_span="2" /> + android:textSize="18sp" /> + + <TextView + android:id="@+id/feed_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="middle" + android:fontFamily="sans-serif-light" + android:singleLine="true" + tools:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA" + android:textColor="?colorSecondary" + android:textSize="12sp" + android:layout_marginTop="4dp" /> <TextView android:id="@+id/excerpt" android:maxLines="2" - android:textAlignment="viewStart" android:ellipsize="end" android:layout_width="match_parent" android:layout_height="match_parent" tools:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." android:textColor="?colorSecondary" android:textSize="13sp" - android:layout_span="2" - android:paddingTop="4dp" /> - - <LinearLayout - android:orientation="horizontal" - android:layout_width="fill_parent" - android:layout_height="fill_parent"> - - <TextView - android:id="@+id/feed_title" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:ellipsize="middle" - android:fontFamily="sans-serif-light" - android:gravity="center_vertical" - android:singleLine="true" - tools:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA" - android:textAlignment="viewStart" - android:textColor="?colorSecondary" - android:textSize="12sp" - android:layout_weight="0.5" - android:paddingTop="4dp" /> - - </LinearLayout> - + android:layout_marginTop="4dp" /> </LinearLayout> <LinearLayout - android:id="@+id/headline_footer" android:orientation="vertical" android:layout_weight="0" - android:layout_width="wrap_content" + android:layout_width="48dp" android:layout_height="match_parent"> <TextView android:id="@+id/date" - android:layout_width="wrap_content" + android:layout_width="match_parent" android:layout_height="wrap_content" android:fontFamily="sans-serif-light" android:singleLine="true" android:ellipsize="none" - android:layout_weight="1" + android:textAlignment="viewEnd" + android:layout_weight="0.5" tools:text="Jan 01" - android:textColor="?colorPrimary" + android:textColor="?colorSecondary" android:textSize="12sp" /> - <com.google.android.material.button.MaterialButton android:id="@+id/marked" style="?attr/materialIconButtonStyle" android:layout_width="wrap_content" - android:layout_gravity="bottom|end" - android:layout_height="wrap_content" - android:layout_weight="0" - android:clickable="true" + android:paddingEnd="0dp" + android:layout_gravity="end" + android:layout_height="24dp" + android:layout_weight="0.5" app:icon="?ic_star_outline" /> - </LinearLayout> - - <!-- <ImageView - android:id="@+id/article_menu_button" - android:layout_gravity="center" - android:layout_width="wrap_content" - android:layout_height="16dp" - android:layout_weight="0" - android:paddingLeft="4dp" - android:paddingRight="4dp" - android:src="@drawable/ic_action_overflow" /> --> - - </LinearLayout>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected.xml b/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected.xml index 6030df54..5721dcb8 100755 --- a/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected.xml @@ -4,16 +4,16 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/headlines_row" - android:padding="@dimen/activity_horizontal_margin" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="16dp" + android:paddingEnd="8dp" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="horizontal" android:background="?colorTertiaryContainer" - android:textColor="?colorOnTertiaryContainer" - tools:ignore="HardcodedText" > + android:orientation="horizontal"> <FrameLayout - android:layout_marginRight="16dp" android:layout_gravity="center_vertical|start" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -21,6 +21,7 @@ <ImageView android:clickable="true" + android:focusable="true" android:layout_width="48dp" android:layout_height="48dp" android:layout_gravity="center" @@ -38,7 +39,6 @@ <LinearLayout android:layout_weight="1" android:orientation="vertical" - android:layout_gravity="center" android:layout_width="match_parent" android:layout_height="wrap_content"> @@ -46,91 +46,63 @@ android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="center_vertical" - android:textAlignment="viewStart" android:maxLines="2" android:ellipsize="end" tools:text="Sample entry title" - android:textSize="18sp" - android:layout_span="2" /> + android:textColor="?colorOnTertiaryContainer" + android:textSize="18sp" /> + + <TextView + android:id="@+id/feed_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="middle" + android:fontFamily="sans-serif-light" + android:singleLine="true" + tools:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA" + android:textColor="?colorOnTertiaryContainer" + android:textSize="12sp" + android:layout_marginTop="4dp" /> <TextView android:id="@+id/excerpt" android:maxLines="2" - android:textAlignment="viewStart" android:ellipsize="end" android:layout_width="match_parent" android:layout_height="match_parent" tools:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." + android:textColor="?colorOnTertiaryContainer" android:textSize="13sp" - android:layout_span="2" - android:paddingTop="4dp" /> - - <LinearLayout - android:orientation="horizontal" - android:layout_width="fill_parent" - android:layout_height="fill_parent"> - - <TextView - android:id="@+id/feed_title" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:ellipsize="middle" - android:fontFamily="sans-serif-light" - android:gravity="center_vertical" - android:singleLine="true" - tools:text="Example Feed" - android:textAlignment="viewStart" - android:textSize="12sp" - android:layout_weight="0.5" - android:paddingTop="4dp" /> - - </LinearLayout> - + android:layout_marginTop="4dp" /> </LinearLayout> <LinearLayout - android:id="@+id/headline_footer" android:orientation="vertical" android:layout_weight="0" - android:layout_width="wrap_content" + android:layout_width="48dp" android:layout_height="match_parent"> <TextView android:id="@+id/date" - android:layout_width="wrap_content" + android:layout_width="match_parent" android:layout_height="wrap_content" android:fontFamily="sans-serif-light" android:singleLine="true" android:ellipsize="none" - android:layout_weight="1" + android:textAlignment="viewEnd" + android:layout_weight="0.5" tools:text="Jan 01" android:textColor="?colorSecondary" android:textSize="12sp" /> - <com.google.android.material.button.MaterialButton android:id="@+id/marked" style="?attr/materialIconButtonStyle" android:layout_width="wrap_content" - android:layout_gravity="bottom|end" - android:layout_height="wrap_content" - android:layout_weight="0" - android:clickable="true" + android:paddingEnd="0dp" + android:layout_height="24dp" + android:layout_weight="0.5" app:icon="?ic_star_outline" /> - </LinearLayout> - - <!-- <ImageView - android:id="@+id/article_menu_button" - android:layout_gravity="center" - android:layout_width="wrap_content" - android:layout_height="16dp" - android:layout_weight="0" - android:paddingLeft="4dp" - android:paddingRight="4dp" - android:src="@drawable/ic_action_overflow" /> --> - - </LinearLayout>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected_unread.xml b/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected_unread.xml index 0d8d930d..06813e04 100755 --- a/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected_unread.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected_unread.xml @@ -4,38 +4,41 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/headlines_row" - android:padding="@dimen/activity_horizontal_margin" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="16dp" + android:paddingEnd="8dp" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="horizontal" android:background="?colorTertiaryContainer" - tools:ignore="HardcodedText" > + android:orientation="horizontal"> <FrameLayout - android:layout_marginRight="8dp" android:layout_gravity="center_vertical|start" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginEnd="8dp"> + android:layout_marginEnd="16dp"> <ImageView android:clickable="true" + android:focusable="true" android:layout_width="48dp" android:layout_height="48dp" + android:layout_gravity="center" android:id="@+id/text_image"/> <ImageView android:layout_width="48dp" android:layout_height="48dp" android:src="@drawable/check_sm" - android:id="@+id/text_checked"/> + android:id="@+id/text_checked" + android:layout_gravity="center" /> </FrameLayout> <LinearLayout android:layout_weight="1" android:orientation="vertical" - android:layout_gravity="center" android:layout_width="match_parent" android:layout_height="wrap_content"> @@ -43,89 +46,65 @@ android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="center_vertical" - android:textAlignment="viewStart" android:maxLines="2" android:ellipsize="end" tools:text="Sample entry title" + android:textColor="?colorOnTertiaryContainer" android:textStyle="bold" - android:textSize="18sp" - android:layout_span="2" /> + android:textSize="18sp" /> + + <TextView + android:id="@+id/feed_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="middle" + android:fontFamily="sans-serif-light" + android:singleLine="true" + tools:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA" + android:textColor="?colorOnTertiaryContainer" + android:textSize="12sp" + android:layout_marginTop="4dp" /> <TextView android:id="@+id/excerpt" android:maxLines="2" - android:textAlignment="viewStart" android:ellipsize="end" android:layout_width="match_parent" android:layout_height="match_parent" tools:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." + android:textColor="?colorOnTertiaryContainer" android:textSize="13sp" - android:layout_span="2" - android:paddingTop="4dp" /> - - <LinearLayout - android:orientation="horizontal" - android:layout_width="fill_parent" - android:layout_height="fill_parent"> - - <TextView - android:id="@+id/feed_title" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:ellipsize="middle" - android:fontFamily="sans-serif-light" - android:gravity="center_vertical" - android:singleLine="true" - tools:text="Example Feed" - android:textAlignment="viewStart" - android:textSize="12sp" - android:layout_weight="0.5" - android:paddingTop="4dp" /> - - </LinearLayout> - + android:layout_marginTop="4dp" /> </LinearLayout> <LinearLayout - android:id="@+id/headline_footer" android:orientation="vertical" android:layout_weight="0" - android:layout_width="wrap_content" + android:layout_width="48dp" android:layout_height="match_parent"> <TextView android:id="@+id/date" - android:layout_width="wrap_content" + android:layout_width="match_parent" android:layout_height="wrap_content" android:fontFamily="sans-serif-light" android:singleLine="true" android:ellipsize="none" - android:layout_weight="1" + android:textAlignment="viewEnd" + android:layout_weight="0.5" tools:text="Jan 01" android:textColor="?colorSecondary" - android:textSize="12sp" /> + android:textSize="12sp" + /> <com.google.android.material.button.MaterialButton android:id="@+id/marked" style="?attr/materialIconButtonStyle" android:layout_width="wrap_content" - android:layout_gravity="bottom|end" - android:layout_height="wrap_content" - android:layout_weight="0" + android:paddingEnd="0dp" + android:layout_gravity="end" + android:layout_height="24dp" + android:layout_weight="0.5" app:icon="?ic_star_outline" /> - </LinearLayout> - - <!-- <ImageView - android:id="@+id/article_menu_button" - android:layout_gravity="center" - android:layout_width="wrap_content" - android:layout_height="16dp" - android:layout_weight="0" - android:paddingLeft="4dp" - android:paddingRight="4dp" - android:src="@drawable/ic_action_overflow" /> --> - - </LinearLayout>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/layout/headlines_row_compact_unread.xml b/org.fox.ttrss/src/main/res/layout/headlines_row_compact_unread.xml index 222d19d1..6aa1bdcd 100755 --- a/org.fox.ttrss/src/main/res/layout/headlines_row_compact_unread.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines_row_compact_unread.xml @@ -4,15 +4,16 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/headlines_row" - android:padding="@dimen/activity_horizontal_margin" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="16dp" + android:paddingEnd="8dp" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="horizontal" android:background="?colorSurfaceContainerLowest" - tools:ignore="HardcodedText" > + android:orientation="horizontal"> <FrameLayout - android:layout_marginRight="16dp" android:layout_gravity="center_vertical|start" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -20,6 +21,7 @@ <ImageView android:clickable="true" + android:focusable="true" android:layout_width="48dp" android:layout_height="48dp" android:layout_gravity="center" @@ -37,7 +39,6 @@ <LinearLayout android:layout_weight="1" android:orientation="vertical" - android:layout_gravity="center" android:layout_width="match_parent" android:layout_height="wrap_content"> @@ -45,78 +46,65 @@ android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="center_vertical" - android:textAlignment="viewStart" android:maxLines="2" android:ellipsize="end" tools:text="Sample entry title" android:textStyle="bold" - android:textSize="18sp" - android:layout_span="2" /> + android:textSize="18sp" /> + + <TextView + android:id="@+id/feed_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="middle" + android:fontFamily="sans-serif-light" + android:singleLine="true" + tools:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA" + android:textColor="?colorSecondary" + android:textSize="12sp" + android:layout_marginTop="4dp" /> <TextView android:id="@+id/excerpt" android:maxLines="2" - android:textAlignment="viewStart" android:ellipsize="end" android:layout_width="match_parent" android:layout_height="match_parent" tools:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." + android:textColor="?colorSecondary" android:textSize="13sp" - android:layout_span="2" - android:paddingTop="4dp" /> - - <LinearLayout - android:orientation="horizontal" - android:layout_width="fill_parent" - android:layout_height="fill_parent"> - - <TextView - android:id="@+id/feed_title" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:ellipsize="middle" - android:fontFamily="sans-serif-light" - android:gravity="center_vertical" - android:singleLine="true" - tools:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA" - android:textAlignment="viewStart" - android:textSize="12sp" - android:layout_weight="0.5" - android:paddingTop="4dp" /> - - </LinearLayout> + android:layout_marginTop="4dp" /> </LinearLayout> <LinearLayout - android:id="@+id/headline_footer" android:orientation="vertical" android:layout_weight="0" - android:layout_width="wrap_content" + android:layout_width="48dp" android:layout_height="match_parent"> <TextView android:id="@+id/date" - android:layout_width="wrap_content" + android:layout_width="match_parent" android:layout_height="wrap_content" android:fontFamily="sans-serif-light" - android:textColor="?colorSecondary" android:singleLine="true" android:ellipsize="none" - android:layout_weight="1" + android:textAlignment="viewEnd" + android:layout_weight="0.5" tools:text="Jan 01" - android:textSize="12sp" /> + android:textColor="?colorSecondary" + android:textSize="12sp" + /> <com.google.android.material.button.MaterialButton android:id="@+id/marked" style="?attr/materialIconButtonStyle" android:layout_width="wrap_content" - android:layout_gravity="bottom|end" - android:layout_height="wrap_content" - android:layout_weight="0" + android:paddingEnd="0dp" + android:layout_gravity="end" + android:layout_height="24dp" + android:layout_weight="0.5" app:icon="?ic_star_outline" /> - </LinearLayout> - </LinearLayout>
\ No newline at end of file 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/action_mode_headlines.xml b/org.fox.ttrss/src/main/res/menu/action_mode_headlines.xml index 35981c01..ccd2c266 100644 --- a/org.fox.ttrss/src/main/res/menu/action_mode_headlines.xml +++ b/org.fox.ttrss/src/main/res/menu/action_mode_headlines.xml @@ -4,7 +4,7 @@ android:id="@+id/selection_toggle_unread" app:showAsAction="always" app:iconTint="?attr/colorControlNormal" - android:icon="@drawable/baseline_mark_as_unread_24" + android:icon="@drawable/baseline_mark_email_unread_24" android:title="@string/selection_toggle_unread"/> <item 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> --> diff --git a/org.fox.ttrss/src/main/res/xml/preferences.xml b/org.fox.ttrss/src/main/res/xml/preferences.xml index 3c422e7e..81fbd5f1 100755 --- a/org.fox.ttrss/src/main/res/xml/preferences.xml +++ b/org.fox.ttrss/src/main/res/xml/preferences.xml @@ -181,26 +181,6 @@ android:summary="@string/prefs_always_open_uri_summary" android:title="@string/prefs_always_open_uri" /> </PreferenceCategory> - <PreferenceCategory android:title="@string/offline_mode" > - <ListPreference - android:defaultValue="250" - android:entries="@array/pref_offline_amounts" - android:entryValues="@array/pref_offline_amounts" - android:key="offline_sync_max" - android:summary="@string/offline_articles_to_download_long" - android:title="@string/offline_articles_to_download" /> - - <SwitchPreferenceCompat - android:defaultValue="false" - android:key="offline_sort_by_feed" - android:title="@string/prefs_offline_sort_by_feed" /> - - <SwitchPreferenceCompat - android:defaultValue="false" - android:key="offline_image_cache_enabled" - android:summary="@string/offline_media_cache_enabled_summary" - android:title="@string/offline_media_cache_enabled" /> - </PreferenceCategory> <PreferenceCategory android:title="@string/prefs_widget" > <ListPreference android:defaultValue="15" |