diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-05-16 08:05:26 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-05-16 08:05:26 +0300 |
| commit | 191ba10cf398212e25e80114a43100dfdcfa55ab (patch) | |
| tree | 14fb034e3ea0dc132e3c6bcfeb358d423e63ac64 /org.fox.ttrss/src/main/res | |
| parent | ef4705f2387ef6158f3d66e8c94ebb9fcc28732a (diff) | |
switch feeds to recycler view while removing most of legacy code
Diffstat (limited to 'org.fox.ttrss/src/main/res')
5 files changed, 82 insertions, 113 deletions
diff --git a/org.fox.ttrss/src/main/res/drawable/baseline_label_24.xml b/org.fox.ttrss/src/main/res/drawable/baseline_label_24.xml new file mode 100644 index 00000000..02371e76 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable/baseline_label_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="M17.63,5.84C17.27,5.33 16.67,5 16,5L5,5.01C3.9,5.01 3,5.9 3,7v10c0,1.1 0.9,1.99 2,1.99L16,19c0.67,0 1.27,-0.33 1.63,-0.84L22,12l-4.37,-6.16z"/> + +</vector> diff --git a/org.fox.ttrss/src/main/res/layout/feeds_row_header.xml b/org.fox.ttrss/src/main/res/layout/feeds_row_header.xml deleted file mode 100755 index f4954259..00000000 --- a/org.fox.ttrss/src/main/res/layout/feeds_row_header.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?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="72dp" - xmlns:tools="http://schemas.android.com/tools" - xmlns:app="http://schemas.android.com/apk/res-auto" - android:orientation="vertical" - android:weightSum="1" - android:clickable="false"> - - <FrameLayout - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <com.google.android.material.button.MaterialButton - style="?attr/materialIconButtonStyle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleX="1.5" - android:scaleY="1.5" - app:icon="@drawable/baseline_settings_24" - android:id="@+id/drawer_settings_btn" - android:layout_gravity="center_vertical|end" - android:layout_marginEnd="8dp" - android:transitionName="SETTINGS_REVEAL" - /> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:layout_alignParentBottom="true" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" - android:id="@+id/linearLayout" - android:layout_gravity="center_horizontal|bottom"> - - <TextView - android:id="@+id/drawer_header_login" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginStart="16dp" - tools:text="user" - android:textAppearance="?attr/textAppearanceHeadlineSmall" - android:textColor="?attr/colorOnSurface"/> - - <TextView - android:id="@+id/drawer_header_server" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginStart="16dp" - android:layout_marginTop="8dp" - android:layout_marginBottom="8dp" - tools:text="example.org" - android:textAppearance="?attr/textAppearanceTitleSmall" - android:textColor="?attr/colorOnSurfaceVariant"/> - </LinearLayout> - </FrameLayout> - - <ProgressBar - style="?android:attr/progressBarStyleHorizontal" - android:visibility="invisible" - android:indeterminate="true" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:id="@+id/feeds_loading_bar" - android:layout_alignParentLeft="true" - android:layout_alignParentBottom="true" - android:layout_gravity="bottom" /> -</FrameLayout>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/layout/fragment_feeds.xml b/org.fox.ttrss/src/main/res/layout/fragment_feeds.xml index bf26e3fc..9f57dda2 100755 --- a/org.fox.ttrss/src/main/res/layout/fragment_feeds.xml +++ b/org.fox.ttrss/src/main/res/layout/fragment_feeds.xml @@ -1,24 +1,82 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" +<androidx.coordinatorlayout.widget.CoordinatorLayout + 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/feeds_fragment" - android:layout_width="fill_parent" - android:layout_height="fill_parent" > + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <androidx.swiperefreshlayout.widget.SwipeRefreshLayout - android:id="@+id/feeds_swipe_container" - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <ListView - android:id="@+id/feeds" - android:dividerHeight="4dp" - android:divider="@null" - android:paddingStart="4dp" - android:paddingEnd="4dp" + <com.google.android.material.appbar.AppBarLayout + android:background="@null" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <FrameLayout + app:layout_scrollFlags="scroll|enterAlways" android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true"> - </ListView> + android:layout_height="wrap_content"> + + <com.google.android.material.button.MaterialButton + style="?attr/materialIconButtonStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scaleX="1.5" + android:scaleY="1.5" + app:icon="@drawable/baseline_settings_24" + android:id="@+id/drawer_settings_btn" + android:layout_gravity="center_vertical|end" + android:layout_marginEnd="8dp" + android:transitionName="SETTINGS_REVEAL" + /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_alignParentBottom="true" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:id="@+id/linearLayout" + android:layout_gravity="center_horizontal|bottom"> + + <TextView + android:id="@+id/drawer_header_login" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + tools:text="user" + android:textAppearance="?attr/textAppearanceHeadlineSmall" + android:textColor="?attr/colorOnSurface"/> + + <TextView + android:id="@+id/drawer_header_server" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp" + tools:text="example.org" + android:textAppearance="?attr/textAppearanceTitleSmall" + android:textColor="?attr/colorOnSurfaceVariant"/> + </LinearLayout> + </FrameLayout> + + </com.google.android.material.appbar.AppBarLayout> + + <androidx.swiperefreshlayout.widget.SwipeRefreshLayout + android:id="@+id/feeds_swipe_container" + app:layout_behavior="@string/appbar_scrolling_view_behavior" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <org.fox.ttrss.util.ContextMenuRecyclerView + android:id="@+id/feeds" + android:scrollbars="vertical" + + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> -</RelativeLayout>
\ No newline at end of file + +</androidx.coordinatorlayout.widget.CoordinatorLayout> diff --git a/org.fox.ttrss/src/main/res/layout/fragment_feeds_recycler.xml b/org.fox.ttrss/src/main/res/layout/fragment_feeds_recycler.xml deleted file mode 100755 index 1ed85a5b..00000000 --- a/org.fox.ttrss/src/main/res/layout/fragment_feeds_recycler.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/feeds_fragment" - android:layout_width="fill_parent" - android:layout_height="fill_parent" > - - <androidx.swiperefreshlayout.widget.SwipeRefreshLayout - android:id="@+id/feeds_swipe_container" - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <org.fox.ttrss.util.ContextMenuRecyclerView - android:id="@+id/feeds" - android:scrollbars="vertical" - android:layout_width="match_parent" - android:layout_height="match_parent" /> - </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> -</RelativeLayout>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/xml/preferences.xml b/org.fox.ttrss/src/main/res/xml/preferences.xml index 8d064587..27bf2a8a 100755 --- a/org.fox.ttrss/src/main/res/xml/preferences.xml +++ b/org.fox.ttrss/src/main/res/xml/preferences.xml @@ -44,13 +44,7 @@ android:title="@string/sort_feeds_by_unread" /> <SwitchPreferenceCompat - android:defaultValue="true" - android:key="enable_cats" - android:title="@string/enable_cats" /> - - <SwitchPreferenceCompat android:defaultValue="false" - android:dependency="enable_cats" android:key="browse_cats_like_feeds" android:summary="@string/browse_cats_like_feeds_summary" android:title="@string/browse_cats_like_feeds" /> |