From a1be03543cf71701f17aa87761e2b74f9e595a95 Mon Sep 17 00:00:00 2001 From: u1 Date: Fri, 31 Aug 2018 16:49:25 +0300 Subject: [PATCH] Grid layout for subscriptions --- .../subscription/SubscriptionFragment.java | 59 ++++++++++++++++++- .../main/res/layout/fragment_subscription.xml | 1 - 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index d8a26f0eb..584acfaf8 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -5,11 +5,15 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.content.SharedPreferences; +import android.content.res.Configuration; +import android.content.res.Resources; import android.graphics.Color; import android.graphics.PorterDuff; import android.os.Bundle; import android.os.Environment; import android.os.Parcelable; +import android.preference.PreferenceManager; import android.support.annotation.DrawableRes; import android.support.annotation.NonNull; import android.support.annotation.Nullable; @@ -17,6 +21,7 @@ import android.support.v4.app.FragmentManager; import android.support.v4.content.LocalBroadcastManager; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; @@ -72,7 +77,7 @@ import static org.schabi.newpipe.local.subscription.services.SubscriptionsImport import static org.schabi.newpipe.util.AnimationUtils.animateRotation; import static org.schabi.newpipe.util.AnimationUtils.animateView; -public class SubscriptionFragment extends BaseStateFragment> { +public class SubscriptionFragment extends BaseStateFragment> implements SharedPreferences.OnSharedPreferenceChangeListener { private static final int REQUEST_EXPORT_CODE = 666; private static final int REQUEST_IMPORT_CODE = 667; @@ -80,6 +85,9 @@ public class SubscriptionFragment extends BaseStateFragment