mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-12-01 12:31:45 +00:00
Fix alignment of filter messages (#7520)
Co-authored-by: ByteHamster <info@bytehamster.com>
This commit is contained in:
@ -67,7 +67,7 @@ public abstract class EpisodesListFragment extends Fragment
|
||||
protected int page = 1;
|
||||
protected boolean isLoadingMore = false;
|
||||
protected boolean hasMoreItems = false;
|
||||
private boolean displayUpArrow;
|
||||
protected boolean displayUpArrow;
|
||||
|
||||
protected EpisodeItemListRecyclerView recyclerView;
|
||||
protected EpisodeItemListAdapter listAdapter;
|
||||
|
||||
@ -42,6 +42,11 @@ public class AllEpisodesFragment extends EpisodesListFragment {
|
||||
updateFilterUi();
|
||||
txtvInformation.setOnClickListener(
|
||||
v -> AllEpisodesFilterDialog.newInstance(getFilter()).show(getChildFragmentManager(), null));
|
||||
|
||||
boolean largePadding = displayUpArrow || !UserPreferences.isBottomNavigationEnabled();
|
||||
int paddingHorizontal = (int) (getResources().getDisplayMetrics().density * (largePadding ? 60 : 16));
|
||||
int paddingVertical = (int) (getResources().getDisplayMetrics().density * 4);
|
||||
txtvInformation.setPadding(paddingHorizontal, paddingVertical, paddingHorizontal, paddingVertical);
|
||||
return root;
|
||||
}
|
||||
|
||||
|
||||
@ -408,6 +408,10 @@ public class QueueFragment extends Fragment implements MaterialToolbar.OnMenuIte
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
|
||||
infoBar = root.findViewById(R.id.info_bar);
|
||||
boolean largePadding = displayUpArrow || !UserPreferences.isBottomNavigationEnabled();
|
||||
int paddingHorizontal = (int) (getResources().getDisplayMetrics().density * (largePadding ? 60 : 16));
|
||||
infoBar.setPadding(paddingHorizontal, 0, paddingHorizontal, 0);
|
||||
|
||||
recyclerView = root.findViewById(R.id.recyclerView);
|
||||
RecyclerView.ItemAnimator animator = recyclerView.getItemAnimator();
|
||||
if (animator instanceof SimpleItemAnimator) {
|
||||
|
||||
@ -9,7 +9,6 @@ import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -75,7 +74,7 @@ public class SubscriptionFragment extends Fragment
|
||||
private RecyclerView subscriptionRecycler;
|
||||
private SubscriptionsRecyclerAdapter subscriptionAdapter;
|
||||
private EmptyViewHandler emptyView;
|
||||
private LinearLayout feedsFilteredMsg;
|
||||
private View feedsFilteredMsg;
|
||||
private MaterialToolbar toolbar;
|
||||
private SwipeRefreshLayout swipeRefreshLayout;
|
||||
private ProgressBar progressBar;
|
||||
@ -163,6 +162,10 @@ public class SubscriptionFragment extends Fragment
|
||||
feedsFilteredMsg = root.findViewById(R.id.feeds_filtered_message);
|
||||
feedsFilteredMsg.setOnClickListener((l) ->
|
||||
new SubscriptionsFilterDialog().show(getChildFragmentManager(), "filter"));
|
||||
boolean largePadding = displayUpArrow || !UserPreferences.isBottomNavigationEnabled();
|
||||
int paddingHorizontal = (int) (getResources().getDisplayMetrics().density * (largePadding ? 60 : 16));
|
||||
int paddingVertical = (int) (getResources().getDisplayMetrics().density * 4);
|
||||
feedsFilteredMsg.setPadding(paddingHorizontal, paddingVertical, paddingHorizontal, paddingVertical);
|
||||
|
||||
swipeRefreshLayout = root.findViewById(R.id.swipeRefresh);
|
||||
swipeRefreshLayout.setDistanceToTriggerSync(getResources().getInteger(R.integer.swipe_refresh_distance));
|
||||
|
||||
@ -24,11 +24,10 @@
|
||||
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:layout_marginTop="-16dp"
|
||||
android:paddingVertical="4dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
@ -20,30 +20,15 @@
|
||||
app:navigationContentDescription="@string/toolbar_back_button_content_description"
|
||||
app:navigationIcon="?homeAsUpIndicator" />
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/feeds_filtered_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="60dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="4dp"
|
||||
android:layout_marginTop="-12dp"
|
||||
android:layout_marginTop="-16dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_info" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:text="@string/subscriptions_are_filtered" />
|
||||
|
||||
</LinearLayout>
|
||||
android:text="@string/filtered_label" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="start"
|
||||
android:paddingTop="4dp"
|
||||
android:text="@string/subscriptions_are_filtered"
|
||||
android:text="@string/filtered_label"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="@dimen/text_size_small" />
|
||||
|
||||
|
||||
@ -28,8 +28,7 @@
|
||||
android:layout_below="@id/toolbar"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginTop="-12dp"
|
||||
android:layout_marginLeft="60dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
tools:text="12 Episodes - Time remaining: 12 hours" />
|
||||
|
||||
|
||||
@ -527,7 +527,6 @@
|
||||
<string name="pref_delete_removes_from_queue_sum">Automatically remove an episode from the queue when it is deleted</string>
|
||||
<string name="pref_filter_feed_title">Subscription filter</string>
|
||||
<string name="pref_filter_feed_sum">Filter your subscriptions in navigation drawer and subscriptions screen</string>
|
||||
<string name="subscriptions_are_filtered">Subscriptions are filtered.</string>
|
||||
<string name="subscriptions_counter_greater_zero">Counter greater than zero</string>
|
||||
<string name="auto_downloaded">Auto downloaded</string>
|
||||
<string name="not_auto_downloaded">Not auto downloaded</string>
|
||||
|
||||
Reference in New Issue
Block a user