Merge branch 'master' into feature/audiotype-support
# Conflicts: # app/src/main/java/com/dkanada/gramophone/util/MusicUtil.java
This commit is contained in:
commit
8d25c1ad31
13 changed files with 313 additions and 11 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 28
|
compileSdkVersion 29
|
||||||
buildToolsVersion '28.0.3'
|
buildToolsVersion '29.0.2'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 19
|
minSdkVersion 19
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
package com.dkanada.gramophone.adapter;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.dkanada.gramophone.R;
|
||||||
|
import com.dkanada.gramophone.model.DirectplayCodec;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DirectplayCodecAdapter extends RecyclerView.Adapter<DirectplayCodecAdapter.ViewHolder> /*implements SwipeAndDragHelper.ActionCompletionContract*/ {
|
||||||
|
private List<DirectplayCodec> directplayCodecs;
|
||||||
|
|
||||||
|
public DirectplayCodecAdapter(List<DirectplayCodec> directplayCodecs) {
|
||||||
|
this.directplayCodecs = directplayCodecs;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NonNull
|
||||||
|
public DirectplayCodecAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.preference_dialog_directplay_codecs_listitem, parent, false);
|
||||||
|
return new ViewHolder(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull DirectplayCodecAdapter.ViewHolder holder, int position) {
|
||||||
|
DirectplayCodec directplayCodec = directplayCodecs.get(position);
|
||||||
|
|
||||||
|
holder.checkBox.setChecked(directplayCodec.selected);
|
||||||
|
holder.title.setText(directplayCodec.title);
|
||||||
|
|
||||||
|
holder.itemView.setOnClickListener(v -> {
|
||||||
|
directplayCodec.selected = !directplayCodec.selected;
|
||||||
|
holder.checkBox.setChecked(directplayCodec.selected);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return directplayCodecs.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DirectplayCodec> getDirectplayCodecs() {
|
||||||
|
return directplayCodecs;
|
||||||
|
}
|
||||||
|
|
||||||
|
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
public CheckBox checkBox;
|
||||||
|
public TextView title;
|
||||||
|
|
||||||
|
public ViewHolder(View view) {
|
||||||
|
super(view);
|
||||||
|
checkBox = view.findViewById(R.id.checkbox);
|
||||||
|
title = view.findViewById(R.id.title);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.dkanada.gramophone.model;
|
||||||
|
|
||||||
|
public class DirectplayCodec {
|
||||||
|
public String codecName;
|
||||||
|
public String title;
|
||||||
|
public String value;
|
||||||
|
public boolean selected;
|
||||||
|
|
||||||
|
public DirectplayCodec(String codecName, String title, String value, boolean selected) {
|
||||||
|
this.codecName = codecName;
|
||||||
|
this.title = title;
|
||||||
|
this.value = value;
|
||||||
|
this.selected = selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Codec {
|
||||||
|
// These are all non-translatable so just keep them here.
|
||||||
|
FLAC("FLAC","flac|flac"),
|
||||||
|
MP3("MP3", "mp3|mp3"),
|
||||||
|
AAC("AAC (.m4a)", "m4a|aac"),
|
||||||
|
OPUS("OPUS (.mka)", "mka|opus"),
|
||||||
|
VORBIS("VORBIS (.ogg)", "ogg|vorbis");
|
||||||
|
|
||||||
|
public final String title;
|
||||||
|
public final String value;
|
||||||
|
|
||||||
|
Codec(String title, String value) {
|
||||||
|
this.value = value;
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.dkanada.gramophone.preferences;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
|
||||||
|
import com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEDialogPreference;
|
||||||
|
|
||||||
|
public class DirectplayPreference extends ATEDialogPreference {
|
||||||
|
public DirectplayPreference(Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DirectplayPreference(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DirectplayPreference(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||||
|
super(context, attrs, defStyleAttr);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DirectplayPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||||
|
super(context, attrs, defStyleAttr, defStyleRes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.dkanada.gramophone.preferences;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.fragment.app.DialogFragment;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.afollestad.materialdialogs.MaterialDialog;
|
||||||
|
import com.dkanada.gramophone.R;
|
||||||
|
import com.dkanada.gramophone.adapter.DirectplayCodecAdapter;
|
||||||
|
import com.dkanada.gramophone.util.PreferenceUtil;
|
||||||
|
|
||||||
|
public class DirectplayPreferenceDialog extends DialogFragment {
|
||||||
|
public static DirectplayPreferenceDialog newInstance() {
|
||||||
|
return new DirectplayPreferenceDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private DirectplayCodecAdapter adapter;
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
|
View view = getActivity().getLayoutInflater().inflate(R.layout.preference_dialog_directplay_codecs, null);
|
||||||
|
|
||||||
|
adapter = new DirectplayCodecAdapter(PreferenceUtil.getInstance(getContext()).getDirectplayCodecs());
|
||||||
|
|
||||||
|
RecyclerView recyclerView = view.findViewById(R.id.recycler_view);
|
||||||
|
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
|
recyclerView.setAdapter(adapter);
|
||||||
|
|
||||||
|
return new MaterialDialog.Builder(getContext())
|
||||||
|
.title(R.string.directplay_codecs)
|
||||||
|
.customView(view, false)
|
||||||
|
.positiveText(android.R.string.ok)
|
||||||
|
.negativeText(android.R.string.cancel)
|
||||||
|
.autoDismiss(false)
|
||||||
|
.onNegative((dialog, action) -> dismiss())
|
||||||
|
.onPositive((dialog, action) -> {
|
||||||
|
PreferenceUtil.getInstance(getContext()).setDirectplayCodecs(adapter.getDirectplayCodecs());
|
||||||
|
dismiss();
|
||||||
|
})
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,8 @@ import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import com.afollestad.materialdialogs.color.ColorChooserDialog;
|
import com.afollestad.materialdialogs.color.ColorChooserDialog;
|
||||||
|
import com.dkanada.gramophone.preferences.DirectplayPreference;
|
||||||
|
import com.dkanada.gramophone.preferences.DirectplayPreferenceDialog;
|
||||||
import com.kabouzeid.appthemehelper.ThemeStore;
|
import com.kabouzeid.appthemehelper.ThemeStore;
|
||||||
import com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEColorPreference;
|
import com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEColorPreference;
|
||||||
import com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceFragmentCompat;
|
import com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceFragmentCompat;
|
||||||
|
|
@ -122,6 +124,7 @@ public class SettingsActivity extends AbsBaseActivity implements ColorChooserDia
|
||||||
addPreferencesFromResource(R.xml.pref_lockscreen);
|
addPreferencesFromResource(R.xml.pref_lockscreen);
|
||||||
addPreferencesFromResource(R.xml.pref_audio);
|
addPreferencesFromResource(R.xml.pref_audio);
|
||||||
addPreferencesFromResource(R.xml.pref_images);
|
addPreferencesFromResource(R.xml.pref_images);
|
||||||
|
addPreferencesFromResource(R.xml.pref_directplay);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
@ -131,6 +134,8 @@ public class SettingsActivity extends AbsBaseActivity implements ColorChooserDia
|
||||||
return NowPlayingScreenPreferenceDialog.newInstance();
|
return NowPlayingScreenPreferenceDialog.newInstance();
|
||||||
} else if (preference instanceof LibraryPreference) {
|
} else if (preference instanceof LibraryPreference) {
|
||||||
return LibraryPreferenceDialog.newInstance();
|
return LibraryPreferenceDialog.newInstance();
|
||||||
|
} else if (preference instanceof DirectplayPreference) {
|
||||||
|
return DirectplayPreferenceDialog.newInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.onCreatePreferenceDialog(preference);
|
return super.onCreatePreferenceDialog(preference);
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import com.dkanada.gramophone.App;
|
||||||
import com.dkanada.gramophone.R;
|
import com.dkanada.gramophone.R;
|
||||||
import com.dkanada.gramophone.model.Album;
|
import com.dkanada.gramophone.model.Album;
|
||||||
import com.dkanada.gramophone.model.Artist;
|
import com.dkanada.gramophone.model.Artist;
|
||||||
|
import com.dkanada.gramophone.model.DirectplayCodec;
|
||||||
import com.dkanada.gramophone.model.Genre;
|
import com.dkanada.gramophone.model.Genre;
|
||||||
import com.dkanada.gramophone.model.Song;
|
import com.dkanada.gramophone.model.Song;
|
||||||
|
|
||||||
|
|
@ -26,27 +27,42 @@ import java.util.Locale;
|
||||||
|
|
||||||
public class MusicUtil {
|
public class MusicUtil {
|
||||||
public static Uri getSongFileUri(Song song) {
|
public static Uri getSongFileUri(Song song) {
|
||||||
StringBuilder builder = new StringBuilder();
|
PreferenceUtil preferenceUtil = PreferenceUtil.getInstance(App.getInstance());
|
||||||
|
|
||||||
|
StringBuilder builder = new StringBuilder(256);
|
||||||
ApiClient apiClient = App.getApiClient();
|
ApiClient apiClient = App.getApiClient();
|
||||||
|
|
||||||
builder.append(apiClient.getApiUrl());
|
builder.append(apiClient.getApiUrl());
|
||||||
builder.append("/Audio/");
|
builder.append("/Audio/");
|
||||||
builder.append(song.id);
|
builder.append(song.id);
|
||||||
builder.append("/universal");
|
builder.append("/universal");
|
||||||
builder.append("?UserId=" + apiClient.getCurrentUserId());
|
builder.append("?UserId=").append(apiClient.getCurrentUserId());
|
||||||
builder.append("&DeviceId=" + apiClient.getDeviceId());
|
builder.append("&DeviceId=").append(apiClient.getDeviceId());
|
||||||
|
|
||||||
// web client maximum is 12444445 and 320kbps is 320000
|
// web client maximum is 12444445 and 320kbps is 320000
|
||||||
builder.append("&MaxStreamingBitrate=" + PreferenceUtil.getInstance(App.getInstance()).getMaximumBitrate());
|
builder.append("&MaxStreamingBitrate=").append(preferenceUtil.getMaximumBitrate());
|
||||||
|
|
||||||
builder.append("&Container=mka|opus,mp3|mp3,m4a|aac,ogg|vorbis,flac|flac");
|
boolean containerAdded = false;
|
||||||
|
for (DirectplayCodec directplayCodec : preferenceUtil.getDirectplayCodecs()){
|
||||||
|
if (directplayCodec.selected){
|
||||||
|
if (!containerAdded){
|
||||||
|
builder.append("&Container=");
|
||||||
|
containerAdded = true;
|
||||||
|
}
|
||||||
|
builder.append(directplayCodec.value).append(',');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (containerAdded){
|
||||||
|
// Remove last comma
|
||||||
|
builder.deleteCharAt(builder.length() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
builder.append("&TranscodingContainer=ts");
|
builder.append("&TranscodingContainer=ts");
|
||||||
builder.append("&TranscodingProtocol=hls");
|
builder.append("&TranscodingProtocol=hls");
|
||||||
|
|
||||||
// preferred codec when transcoding
|
// preferred codec when transcoding
|
||||||
builder.append("&AudioCodec=" + PreferenceUtil.getInstance(App.getInstance()).getTranscodeCodec());
|
builder.append("&AudioCodec=").append(preferenceUtil.getTranscodeCodec());
|
||||||
builder.append("&api_key=" + apiClient.getAccessToken());
|
builder.append("&api_key=").append(apiClient.getAccessToken());
|
||||||
|
|
||||||
Log.i(MusicUtil.class.getName(), "playing audio: " + builder);
|
Log.i(MusicUtil.class.getName(), "playing audio: " + builder);
|
||||||
return Uri.parse(builder.toString());
|
return Uri.parse(builder.toString());
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
|
||||||
import androidx.annotation.StyleRes;
|
import androidx.annotation.StyleRes;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
|
@ -14,14 +15,18 @@ import com.dkanada.gramophone.R;
|
||||||
import com.dkanada.gramophone.helper.sort.SortMethod;
|
import com.dkanada.gramophone.helper.sort.SortMethod;
|
||||||
import com.dkanada.gramophone.helper.sort.SortOrder;
|
import com.dkanada.gramophone.helper.sort.SortOrder;
|
||||||
import com.dkanada.gramophone.model.CategoryInfo;
|
import com.dkanada.gramophone.model.CategoryInfo;
|
||||||
|
import com.dkanada.gramophone.model.DirectplayCodec;
|
||||||
import com.dkanada.gramophone.ui.fragments.player.NowPlayingScreen;
|
import com.dkanada.gramophone.ui.fragments.player.NowPlayingScreen;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
public final class PreferenceUtil {
|
public final class PreferenceUtil {
|
||||||
public static final String CATEGORIES = "library_categories";
|
public static final String CATEGORIES = "library_categories";
|
||||||
|
public static final String DIRECTPLAY_CODECS = "directplay_codecs";
|
||||||
public static final String MAXIMUM_LIST_SIZE = "maximum_list_size";
|
public static final String MAXIMUM_LIST_SIZE = "maximum_list_size";
|
||||||
public static final String REMEMBER_LAST_TAB = "remember_last_tab";
|
public static final String REMEMBER_LAST_TAB = "remember_last_tab";
|
||||||
public static final String LAST_TAB = "last_tab";
|
public static final String LAST_TAB = "last_tab";
|
||||||
|
|
@ -417,4 +422,38 @@ public final class PreferenceUtil {
|
||||||
defaultCategories.add(new CategoryInfo(CategoryInfo.Category.PLAYLISTS, true));
|
defaultCategories.add(new CategoryInfo(CategoryInfo.Category.PLAYLISTS, true));
|
||||||
return defaultCategories;
|
return defaultCategories;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<DirectplayCodec> getDirectplayCodecs() {
|
||||||
|
DirectplayCodec.Codec[] codecs = DirectplayCodec.Codec.values();
|
||||||
|
|
||||||
|
Set<String> selectedCodecNames = new HashSet<>();
|
||||||
|
for (DirectplayCodec.Codec codec : codecs){
|
||||||
|
selectedCodecNames.add(codec.name());
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedCodecNames = mPreferences.getStringSet(DIRECTPLAY_CODECS, selectedCodecNames);
|
||||||
|
|
||||||
|
ArrayList<DirectplayCodec> directplayCodecs = new ArrayList<>();
|
||||||
|
for (DirectplayCodec.Codec codec : codecs){
|
||||||
|
String name = codec.name();
|
||||||
|
boolean selected = selectedCodecNames.contains(name);
|
||||||
|
|
||||||
|
directplayCodecs.add(new DirectplayCodec(name, codec.title, codec.value, selected));
|
||||||
|
}
|
||||||
|
|
||||||
|
return directplayCodecs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirectplayCodecs(List<DirectplayCodec> directplayCodecs){
|
||||||
|
Set<String> codecNames = new HashSet<>();
|
||||||
|
for (DirectplayCodec directplayCodec : directplayCodecs){
|
||||||
|
if (directplayCodec.selected){
|
||||||
|
codecNames.add(directplayCodec.codecName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||||
|
editor.putStringSet(DIRECTPLAY_CODECS, codecNames);
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:descendantFocusability="blocksDescendants"
|
||||||
|
android:focusable="true"
|
||||||
|
android:foreground="?attr/rectSelector"
|
||||||
|
android:minHeight="@dimen/md_listitem_height"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingEnd="@dimen/md_dialog_frame_margin"
|
||||||
|
android:paddingLeft="@dimen/md_dialog_frame_margin"
|
||||||
|
android:paddingRight="@dimen/md_dialog_frame_margin"
|
||||||
|
android:paddingStart="@dimen/md_dialog_frame_margin"
|
||||||
|
tools:gravity="start|center_vertical">
|
||||||
|
|
||||||
|
<com.kabouzeid.appthemehelper.common.views.ATECheckBox
|
||||||
|
android:id="@+id/checkbox"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@null"
|
||||||
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
|
android:gravity="center_vertical" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:minHeight="@dimen/md_listitem_height"
|
||||||
|
android:paddingBottom="@dimen/md_listitem_vertical_margin_choice"
|
||||||
|
android:paddingStart="@dimen/md_listitem_control_margin"
|
||||||
|
android:paddingTop="@dimen/md_listitem_vertical_margin_choice"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textSize="@dimen/md_listitem_textsize"
|
||||||
|
tools:text="Item" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
@ -93,11 +93,13 @@
|
||||||
<string name="pref_header_colors">Colors</string>
|
<string name="pref_header_colors">Colors</string>
|
||||||
<string name="pref_header_now_playing_screen">Now Playing</string>
|
<string name="pref_header_now_playing_screen">Now Playing</string>
|
||||||
<string name="pref_header_audio">Audio</string>
|
<string name="pref_header_audio">Audio</string>
|
||||||
|
<string name="pref_header_directplay">Directplay</string>
|
||||||
<string name="pref_header_images">Images</string>
|
<string name="pref_header_images">Images</string>
|
||||||
<string name="pref_header_library">Library</string>
|
<string name="pref_header_library">Library</string>
|
||||||
<string name="pref_header_lockscreen">Lockscreen</string>
|
<string name="pref_header_lockscreen">Lockscreen</string>
|
||||||
<string name="pref_header_notification">Notification</string>
|
<string name="pref_header_notification">Notification</string>
|
||||||
|
|
||||||
|
<string name="directplay_codecs">Directplay Codecs</string>
|
||||||
<string name="library_categories">Categories</string>
|
<string name="library_categories">Categories</string>
|
||||||
<string name="primary_color">Primary Color</string>
|
<string name="primary_color">Primary Color</string>
|
||||||
<string name="accent_color">Accent Color</string>
|
<string name="accent_color">Accent Color</string>
|
||||||
|
|
@ -135,6 +137,7 @@
|
||||||
<string name="pref_summary_colored_app_shortcuts">Colors the app shortcuts in the primary color.</string>
|
<string name="pref_summary_colored_app_shortcuts">Colors the app shortcuts in the primary color.</string>
|
||||||
<string name="pref_summary_remember_last_tab">Go to the last opened tab on launch.</string>
|
<string name="pref_summary_remember_last_tab">Go to the last opened tab on launch.</string>
|
||||||
<string name="pref_summary_library_categories">Configure visibility and order of display categories.</string>
|
<string name="pref_summary_library_categories">Configure visibility and order of display categories.</string>
|
||||||
|
<string name="pref_summary_directplay_codecs">Disable directplay codecs to force transcoding.</string>
|
||||||
|
|
||||||
<string name="delete_action">Delete</string>
|
<string name="delete_action">Delete</string>
|
||||||
<string name="remove_action">Remove</string>
|
<string name="remove_action">Remove</string>
|
||||||
|
|
|
||||||
15
app/src/main/res/xml/pref_directplay.xml
Normal file
15
app/src/main/res/xml/pref_directplay.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_directplay">
|
||||||
|
|
||||||
|
<com.dkanada.gramophone.preferences.DirectplayPreference
|
||||||
|
app:iconSpaceReserved="false"
|
||||||
|
android:key="directplay_codecs"
|
||||||
|
android:summary="@string/pref_summary_directplay_codecs"
|
||||||
|
android:title="@string/directplay_codecs" />
|
||||||
|
|
||||||
|
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
|
||||||
|
|
||||||
|
</androidx.preference.PreferenceScreen>
|
||||||
|
|
@ -6,7 +6,7 @@ buildscript {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools:r8:1.6.84'
|
classpath 'com.android.tools:r8:1.6.84'
|
||||||
classpath 'com.android.tools.build:gradle:4.0.0'
|
classpath 'com.android.tools.build:gradle:4.0.1'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue