-Revamped local items to display more information such as service name, etc.
-Enabled reordering, renaming, removing of items on playlist fragment. -Enabled removal of dangling streams entries when history is cleared. -Changed playlist append menu item to icon on service player activity. -Added adapter and builder for local items, removed dependency on infoitem and existing infolist for database entry items. -Removed watch history entity and DAO. -Extracted info item selected listener to remove adding boilerplate code when long click functionality is optional. -Fixed query returning no record on left join when right table is empty.
This commit is contained in:
parent
b613ff8bae
commit
ee618f7911
38 changed files with 1224 additions and 506 deletions
|
|
@ -4,6 +4,7 @@ import android.content.Context;
|
|||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.PluralsRes;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.text.TextUtils;
|
||||
|
|
@ -14,7 +15,9 @@ import java.text.DateFormat;
|
|||
import java.text.NumberFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/*
|
||||
|
|
@ -39,9 +42,33 @@ import java.util.Locale;
|
|||
|
||||
public class Localization {
|
||||
|
||||
public final static String DOT_SEPARATOR = " • ";
|
||||
|
||||
private Localization() {
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static String concatenateStrings(final String... strings) {
|
||||
return concatenateStrings(Arrays.asList(strings));
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static String concatenateStrings(final List<String> strings) {
|
||||
if (strings.isEmpty()) return "";
|
||||
|
||||
final StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append(strings.get(0));
|
||||
|
||||
for (int i = 1; i < strings.size(); i++) {
|
||||
final String string = strings.get(i);
|
||||
if (!TextUtils.isEmpty(string)) {
|
||||
stringBuilder.append(DOT_SEPARATOR).append(strings.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
|
||||
public static Locale getPreferredLocale(Context context) {
|
||||
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ import org.schabi.newpipe.fragments.list.kiosk.KioskFragment;
|
|||
import org.schabi.newpipe.fragments.list.playlist.PlaylistFragment;
|
||||
import org.schabi.newpipe.fragments.list.search.SearchFragment;
|
||||
import org.schabi.newpipe.fragments.local.LocalPlaylistFragment;
|
||||
import org.schabi.newpipe.fragments.local.MostPlayedFragment;
|
||||
import org.schabi.newpipe.fragments.local.WatchHistoryFragment;
|
||||
import org.schabi.newpipe.fragments.local.bookmark.MostPlayedFragment;
|
||||
import org.schabi.newpipe.fragments.local.bookmark.WatchHistoryFragment;
|
||||
import org.schabi.newpipe.history.HistoryActivity;
|
||||
import org.schabi.newpipe.player.BackgroundPlayer;
|
||||
import org.schabi.newpipe.player.BackgroundPlayerActivity;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue