Implement new feed and subscriptions groups
- Introduce Groupie for easier lists implementations - Use some of the new components of the Android Architecture libraries - Add a bunch of icons for groups, using vectors, which still is compatible with older APIs through the compatibility layer
This commit is contained in:
parent
e8ab5aacc7
commit
20a4bb0936
143 changed files with 4099 additions and 1370 deletions
6
app/src/main/java/org/schabi/newpipe/util/ConstantsKt.kt
Normal file
6
app/src/main/java/org/schabi/newpipe/util/ConstantsKt.kt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
package org.schabi.newpipe.util
|
||||
|
||||
/**
|
||||
* Default duration when using throttle functions across the app, in milliseconds.
|
||||
*/
|
||||
const val DEFAULT_THROTTLE_TIMEOUT = 120L
|
||||
|
|
@ -343,9 +343,13 @@ public class NavigationHelper {
|
|||
.commit();
|
||||
}
|
||||
|
||||
public static void openWhatsNewFragment(FragmentManager fragmentManager) {
|
||||
public static void openFeedFragment(FragmentManager fragmentManager) {
|
||||
openFeedFragment(fragmentManager, -1, null);
|
||||
}
|
||||
|
||||
public static void openFeedFragment(FragmentManager fragmentManager, long groupId, @Nullable String groupName) {
|
||||
defaultTransaction(fragmentManager)
|
||||
.replace(R.id.fragment_holder, new FeedFragment())
|
||||
.replace(R.id.fragment_holder, FeedFragment.newInstance(groupId, groupName))
|
||||
.addToBackStack(null)
|
||||
.commit();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,6 +99,17 @@ public class ThemeHelper {
|
|||
return isLightThemeSelected(context) ? R.style.LightDialogTheme : R.style.DarkDialogTheme;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a min-width dialog theme styled according to the (default) selected theme.
|
||||
*
|
||||
* @param context context to get the selected theme
|
||||
* @return the dialog style (the default one)
|
||||
*/
|
||||
@StyleRes
|
||||
public static int getMinWidthDialogTheme(Context context) {
|
||||
return isLightThemeSelected(context) ? R.style.LightDialogMinWidthTheme : R.style.DarkDialogMinWidthTheme;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the selected theme styled according to the serviceId.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue