diff options
author | ByteHamster <info@bytehamster.com> | 2022-08-04 23:09:38 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-09-18 18:57:43 +0200 |
commit | ac8114342c4beb90745cfc5bd9235ca219a36b29 (patch) | |
tree | 51997df3f5131e8ab5be1dbebe4f953990cca865 /app/src/main/res/layout | |
parent | a12854a96b6233540dc54bb417eaa48e1759b131 (diff) | |
download | AntennaPod-ac8114342c4beb90745cfc5bd9235ca219a36b29.zip |
Migrate Toolbars to Material3
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/addfeed.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/audioplayer_fragment.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/download_log_fragment.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/episodes_list_fragment.xml | 58 | ||||
-rw-r--r-- | app/src/main/res/layout/feed_item_list_fragment.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/layout/feedinfo.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/feeditem_pager_fragment.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/feedsettings.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_itunes_search.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_subscriptions.xml | 54 | ||||
-rw-r--r-- | app/src/main/res/layout/home_fragment.xml | 19 | ||||
-rw-r--r-- | app/src/main/res/layout/queue_fragment.xml | 52 | ||||
-rw-r--r-- | app/src/main/res/layout/search_fragment.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/simple_list_fragment.xml | 26 | ||||
-rw-r--r-- | app/src/main/res/layout/subscription_selection_activity.xml | 2 |
15 files changed, 120 insertions, 112 deletions
diff --git a/app/src/main/res/layout/addfeed.xml b/app/src/main/res/layout/addfeed.xml index 8e2fb99fa..26bc9aa21 100644 --- a/app/src/main/res/layout/addfeed.xml +++ b/app/src/main/res/layout/addfeed.xml @@ -6,7 +6,7 @@ android:layout_height="match_parent" android:orientation="vertical"> - <androidx.appcompat.widget.Toolbar + <com.google.android.material.appbar.MaterialToolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/audioplayer_fragment.xml b/app/src/main/res/layout/audioplayer_fragment.xml index 2008a8f33..d8dfe2eb4 100644 --- a/app/src/main/res/layout/audioplayer_fragment.xml +++ b/app/src/main/res/layout/audioplayer_fragment.xml @@ -6,7 +6,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - <androidx.appcompat.widget.Toolbar + <com.google.android.material.appbar.MaterialToolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/download_log_fragment.xml b/app/src/main/res/layout/download_log_fragment.xml index eb80d3f5f..08473533b 100644 --- a/app/src/main/res/layout/download_log_fragment.xml +++ b/app/src/main/res/layout/download_log_fragment.xml @@ -6,7 +6,7 @@ android:layout_height="match_parent" android:minHeight="300dp"> - <androidx.appcompat.widget.Toolbar + <com.google.android.material.appbar.MaterialToolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/episodes_list_fragment.xml b/app/src/main/res/layout/episodes_list_fragment.xml index 343d530fd..7ad7e5d21 100644 --- a/app/src/main/res/layout/episodes_list_fragment.xml +++ b/app/src/main/res/layout/episodes_list_fragment.xml @@ -4,47 +4,45 @@ xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> + android:layout_height="match_parent"> - <androidx.appcompat.widget.Toolbar - android:id="@+id/toolbar" + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentTop="true" - android:minHeight="?attr/actionBarSize" - android:theme="?attr/actionBarTheme" - app:navigationIcon="?homeAsUpIndicator" /> - - <TextView - android:id="@+id/txtvInformation" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="?attr/selectableItemBackground" - android:gravity="center" - android:layout_below="@id/toolbar" - android:paddingTop="2dp" - android:paddingBottom="2dp" - android:visibility="gone" - tools:text="(i) Information" /> + android:layout_height="wrap_content"> + + <com.google.android.material.appbar.MaterialToolbar + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + app:navigationIcon="?homeAsUpIndicator" /> + + <TextView + android:id="@+id/txtvInformation" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?attr/selectableItemBackground" + android:paddingBottom="8dp" + android:text="@string/filtered_label" + android:layout_marginTop="-12dp" + android:layout_marginLeft="60dp" + android:layout_marginStart="60dp" + android:visibility="gone" + tools:visibility="visible" /> + + </com.google.android.material.appbar.AppBarLayout> <androidx.swiperefreshlayout.widget.SwipeRefreshLayout android:id="@+id/swipeRefresh" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_below="@+id/txtvInformation"> + android:layout_below="@id/appbar"> <de.danoeh.antennapod.view.EpisodeItemListRecyclerView - android:id="@android:id/list" + android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginTop="0dp" - android:layout_marginBottom="0dp" - android:paddingTop="@dimen/list_vertical_padding" - android:paddingBottom="@dimen/list_vertical_padding" - android:paddingHorizontal="@dimen/additional_horizontal_spacing" - tools:itemCount="13" - tools:listitem="@layout/feeditemlist_item" /> + android:paddingHorizontal="@dimen/additional_horizontal_spacing" /> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> diff --git a/app/src/main/res/layout/feed_item_list_fragment.xml b/app/src/main/res/layout/feed_item_list_fragment.xml index 2cc2b8214..6c950948d 100644 --- a/app/src/main/res/layout/feed_item_list_fragment.xml +++ b/app/src/main/res/layout/feed_item_list_fragment.xml @@ -14,8 +14,6 @@ android:id="@+id/collapsing_toolbar" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?android:attr/windowBackground" - app:contentScrim="?android:attr/windowBackground" app:scrimAnimationDuration="200" app:layout_scrollFlags="scroll|exitUntilCollapsed"> @@ -33,12 +31,11 @@ layout="@layout/feeditemlist_header" app:layout_collapseMode="parallax" /> - <androidx.appcompat.widget.Toolbar + <com.google.android.material.appbar.MaterialToolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?attr/actionBarSize" - android:theme="?attr/actionBarTheme" android:layout_alignParentTop="true" app:navigationIcon="?homeAsUpIndicator" app:layout_collapseMode="pin" /> diff --git a/app/src/main/res/layout/feedinfo.xml b/app/src/main/res/layout/feedinfo.xml index ac9db8fa2..5461d9276 100644 --- a/app/src/main/res/layout/feedinfo.xml +++ b/app/src/main/res/layout/feedinfo.xml @@ -34,7 +34,7 @@ layout="@layout/feeditemlist_header" app:layout_collapseMode="parallax" /> - <androidx.appcompat.widget.Toolbar + <com.google.android.material.appbar.MaterialToolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/feeditem_pager_fragment.xml b/app/src/main/res/layout/feeditem_pager_fragment.xml index 690ac3bc1..2c96e3721 100644 --- a/app/src/main/res/layout/feeditem_pager_fragment.xml +++ b/app/src/main/res/layout/feeditem_pager_fragment.xml @@ -6,7 +6,7 @@ android:layout_width="match_parent" android:orientation="vertical"> - <androidx.appcompat.widget.Toolbar + <com.google.android.material.appbar.MaterialToolbar android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?attr/actionBarSize" diff --git a/app/src/main/res/layout/feedsettings.xml b/app/src/main/res/layout/feedsettings.xml index df6e666eb..beadf7c75 100644 --- a/app/src/main/res/layout/feedsettings.xml +++ b/app/src/main/res/layout/feedsettings.xml @@ -5,7 +5,7 @@ android:layout_height="match_parent" android:orientation="vertical"> - <androidx.appcompat.widget.Toolbar + <com.google.android.material.appbar.MaterialToolbar android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?attr/actionBarSize" diff --git a/app/src/main/res/layout/fragment_itunes_search.xml b/app/src/main/res/layout/fragment_itunes_search.xml index b20016f68..35472fbde 100644 --- a/app/src/main/res/layout/fragment_itunes_search.xml +++ b/app/src/main/res/layout/fragment_itunes_search.xml @@ -13,7 +13,7 @@ android:orientation="horizontal" android:layout_alignParentTop="true"> - <androidx.appcompat.widget.Toolbar + <com.google.android.material.appbar.MaterialToolbar android:id="@+id/toolbar" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/fragment_subscriptions.xml b/app/src/main/res/layout/fragment_subscriptions.xml index 7bb652eb4..65ee34c53 100644 --- a/app/src/main/res/layout/fragment_subscriptions.xml +++ b/app/src/main/res/layout/fragment_subscriptions.xml @@ -4,38 +4,40 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> + android:layout_height="match_parent"> - <androidx.appcompat.widget.Toolbar - android:id="@+id/toolbar" + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="?attr/actionBarSize" - android:theme="?attr/actionBarTheme" - android:layout_alignParentTop="true" - app:title="@string/subscriptions_label" - app:navigationIcon="?homeAsUpIndicator" /> + android:layout_height="wrap_content"> - <TextView - android:id="@+id/feeds_filtered_message" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@id/toolbar" - android:background="?android:attr/selectableItemBackground" - android:gravity="start" - android:paddingStart="8dp" - android:paddingTop="4dp" - android:paddingEnd="8dp" - android:paddingBottom="8dp" - android:textColor="?android:attr/textColorSecondary" - android:textSize="@dimen/text_size_small" /> + <com.google.android.material.appbar.MaterialToolbar + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + app:title="@string/subscriptions_label" + app:navigationIcon="?homeAsUpIndicator" /> + + <TextView + android:id="@+id/feeds_filtered_message" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingBottom="8dp" + android:text="@string/filtered_label" + android:layout_marginTop="-12dp" + android:layout_marginLeft="60dp" + android:layout_marginStart="60dp" + android:background="?android:attr/selectableItemBackground" + android:visibility="gone" + tools:visibility="visible" /> + + </com.google.android.material.appbar.AppBarLayout> <androidx.swiperefreshlayout.widget.SwipeRefreshLayout android:id="@+id/swipeRefresh" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_below="@id/feeds_filtered_message"> + android:layout_below="@id/appbar"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/subscriptions_grid" @@ -54,9 +56,9 @@ android:layout_width="56dp" android:layout_height="56dp" android:layout_margin="16dp" - android:layout_alignParentBottom="true" - android:layout_alignParentEnd="true" android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" + android:layout_alignParentBottom="true" android:contentDescription="@string/add_feed_label" app:srcCompat="@drawable/ic_add" /> diff --git a/app/src/main/res/layout/home_fragment.xml b/app/src/main/res/layout/home_fragment.xml index 040e3df34..0c5d872b3 100644 --- a/app/src/main/res/layout/home_fragment.xml +++ b/app/src/main/res/layout/home_fragment.xml @@ -6,14 +6,20 @@ android:layout_height="match_parent" android:orientation="vertical"> - <androidx.appcompat.widget.Toolbar - android:id="@+id/toolbar" + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:minHeight="?attr/actionBarSize" - android:theme="?attr/actionBarTheme" - app:title="@string/home_label" - app:navigationIcon="?homeAsUpIndicator" /> + android:fitsSystemWindows="true" + android:elevation="0dp"> + + <com.google.android.material.appbar.MaterialToolbar + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + app:title="@string/home_label" /> + + </com.google.android.material.appbar.AppBarLayout> <LinearLayout android:id="@+id/welcomeContainer" @@ -60,6 +66,7 @@ </LinearLayout> <androidx.core.widget.NestedScrollView + android:id="@+id/homeScrollView" android:layout_width="match_parent" android:layout_height="wrap_content"> diff --git a/app/src/main/res/layout/queue_fragment.xml b/app/src/main/res/layout/queue_fragment.xml index db7c55c85..9bc4e0fa5 100644 --- a/app/src/main/res/layout/queue_fragment.xml +++ b/app/src/main/res/layout/queue_fragment.xml @@ -6,40 +6,38 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - <androidx.appcompat.widget.Toolbar - android:id="@+id/toolbar" + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:minHeight="?attr/actionBarSize" - android:theme="?attr/actionBarTheme" - android:layout_alignParentTop="true" - app:title="@string/queue_label" - app:navigationIcon="?homeAsUpIndicator" /> - - <TextView - android:id="@+id/info_bar" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@id/toolbar" - android:textSize="12sp" - android:layout_marginTop="-8dp" - android:layout_marginLeft="72dp" - android:layout_marginStart="72dp" - android:layout_marginBottom="4dp" - tools:text="12 Episodes - Time remaining: 12 hours" /> - - <View - android:id="@+id/divider" - android:layout_width="match_parent" - android:layout_height="1dp" - android:layout_below="@id/info_bar" - android:background="?android:attr/listDivider" /> + android:elevation="0dp"> + + <com.google.android.material.appbar.MaterialToolbar + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + app:navigationIcon="?homeAsUpIndicator" + app:title="@string/queue_label" /> + + <TextView + android:id="@+id/info_bar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@id/toolbar" + android:textSize="12sp" + android:layout_marginTop="-12dp" + android:layout_marginLeft="60dp" + android:layout_marginStart="60dp" + android:layout_marginBottom="8dp" + tools:text="12 Episodes - Time remaining: 12 hours" /> + + </com.google.android.material.appbar.AppBarLayout> <androidx.swiperefreshlayout.widget.SwipeRefreshLayout android:id="@+id/swipeRefresh" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_below="@id/divider"> + android:layout_below="@id/appbar"> <de.danoeh.antennapod.view.EpisodeItemListRecyclerView android:id="@+id/recyclerView" diff --git a/app/src/main/res/layout/search_fragment.xml b/app/src/main/res/layout/search_fragment.xml index 5745cf655..daeb88528 100644 --- a/app/src/main/res/layout/search_fragment.xml +++ b/app/src/main/res/layout/search_fragment.xml @@ -5,7 +5,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - <androidx.appcompat.widget.Toolbar + <com.google.android.material.appbar.MaterialToolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/simple_list_fragment.xml b/app/src/main/res/layout/simple_list_fragment.xml index 5019edcfd..fc08dccf2 100644 --- a/app/src/main/res/layout/simple_list_fragment.xml +++ b/app/src/main/res/layout/simple_list_fragment.xml @@ -1,35 +1,41 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout +<androidx.coordinatorlayout.widget.CoordinatorLayout 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="match_parent"> - <androidx.appcompat.widget.Toolbar - android:id="@+id/toolbar" + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:minHeight="?attr/actionBarSize" - android:theme="?attr/actionBarTheme" - android:layout_alignParentTop="true" - app:navigationIcon="?homeAsUpIndicator" /> + android:fitsSystemWindows="true"> + + <com.google.android.material.appbar.MaterialToolbar + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + app:navigationIcon="?homeAsUpIndicator" /> + + </com.google.android.material.appbar.AppBarLayout> <de.danoeh.antennapod.view.EpisodeItemListRecyclerView android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingHorizontal="@dimen/additional_horizontal_spacing" - android:layout_below="@id/toolbar" /> + android:layout_below="@id/appbar" + app:layout_behavior="@string/appbar_scrolling_view_behavior" /> <ProgressBar android:id="@+id/progLoading" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_centerInParent="true" + android:layout_gravity="center" android:indeterminateOnly="true" android:visibility="gone" /> <include layout="@layout/multi_select_speed_dial" /> -</RelativeLayout> +</androidx.coordinatorlayout.widget.CoordinatorLayout> diff --git a/app/src/main/res/layout/subscription_selection_activity.xml b/app/src/main/res/layout/subscription_selection_activity.xml index b54e7e4a4..0331923e6 100644 --- a/app/src/main/res/layout/subscription_selection_activity.xml +++ b/app/src/main/res/layout/subscription_selection_activity.xml @@ -20,7 +20,7 @@ android:layout_height="match_parent" android:orientation="vertical"> - <androidx.appcompat.widget.Toolbar + <com.google.android.material.appbar.MaterialToolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" |