aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/util/Constants.java1
-rw-r--r--app/src/main/java/github/daneren2005/dsub/util/Util.java5
-rw-r--r--app/src/main/java/github/daneren2005/dsub/view/SongView.java4
-rw-r--r--app/src/main/res/values/strings.xml2
-rw-r--r--app/src/main/res/xml/settings_appearance.xml7
5 files changed, 18 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/util/Constants.java b/app/src/main/java/github/daneren2005/dsub/util/Constants.java
index 0ce58d73..91e3e37c 100644
--- a/app/src/main/java/github/daneren2005/dsub/util/Constants.java
+++ b/app/src/main/java/github/daneren2005/dsub/util/Constants.java
@@ -93,6 +93,7 @@ public final class Constants {
public static final String PREFERENCES_KEY_THEME = "theme";
public static final String PREFERENCES_KEY_FULL_SCREEN = "fullScreen";
public static final String PREFERENCES_KEY_DISPLAY_TRACK = "displayTrack";
+ public static final String PREFERENCES_KEY_DISPLAY_FILE_SUFFIX = "displayFileSuffix";
public static final String PREFERENCES_KEY_MAX_BITRATE_WIFI = "maxBitrateWifi";
public static final String PREFERENCES_KEY_MAX_BITRATE_MOBILE = "maxBitrateMobile";
public static final String PREFERENCES_KEY_MAX_VIDEO_BITRATE_WIFI = "maxVideoBitrateWifi";
diff --git a/app/src/main/java/github/daneren2005/dsub/util/Util.java b/app/src/main/java/github/daneren2005/dsub/util/Util.java
index 1aa17c35..7989e8c9 100644
--- a/app/src/main/java/github/daneren2005/dsub/util/Util.java
+++ b/app/src/main/java/github/daneren2005/dsub/util/Util.java
@@ -277,6 +277,11 @@ public final class Util {
return prefs.getBoolean(Constants.PREFERENCES_KEY_DISPLAY_TRACK, true);
}
+ public static boolean getDisplayFileSuffix(Context context) {
+ SharedPreferences prefs = getPreferences(context);
+ return prefs.getBoolean(Constants.PREFERENCES_KEY_DISPLAY_FILE_SUFFIX, true);
+ }
+
public static int getMaxBitrate(Context context) {
ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = manager.getActiveNetworkInfo();
diff --git a/app/src/main/java/github/daneren2005/dsub/view/SongView.java b/app/src/main/java/github/daneren2005/dsub/view/SongView.java
index 7a91ea6e..5ef06880 100644
--- a/app/src/main/java/github/daneren2005/dsub/view/SongView.java
+++ b/app/src/main/java/github/daneren2005/dsub/view/SongView.java
@@ -177,7 +177,9 @@ public class SongView extends UpdateView2<MusicDirectory.Entry, Boolean> {
titleTextView.setText(title);
artistTextView.setText(artist);
- suffixTextView.setText(song.getSuffix());
+ if(Util.getDisplayFileSuffix(context)) {
+ suffixTextView.setText(song.getSuffix());
+ }
this.setBackgroundColor(0x00000000);
ratingBar.setVisibility(View.GONE);
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 87ebbe07..ea2b4f1a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -315,6 +315,8 @@
<string name="settings.theme_fullscreen_summary">Hide as many UI elements as Android will allow</string>
<string name="settings.track_title">Display Track #</string>
<string name="settings.track_summary">Display Track # in front of songs if one exists</string>
+ <string name="settings.file_suffix">Display file suffix</string>
+ <string name="settings.file_suffix_summary">Display the suffix for your tracks</string>
<string name="settings.custom_sort">Sort By Year</string>
<string name="settings.custom_sort_summary">Sort albums by year, or by alphabetical</string>
<string name="settings.open_to_tab">Open To Tab</string>
diff --git a/app/src/main/res/xml/settings_appearance.xml b/app/src/main/res/xml/settings_appearance.xml
index 530d92a1..a0c2ac26 100644
--- a/app/src/main/res/xml/settings_appearance.xml
+++ b/app/src/main/res/xml/settings_appearance.xml
@@ -36,6 +36,13 @@
android:defaultValue="true"/>
<CheckBoxPreference
+ android:title="@string/settings.file_suffix"
+ android:summary="@string/settings.file_suffix_summary"
+ android:key="displayFileSuffix"
+ android:defaultValue="true"/>
+
+
+ <CheckBoxPreference
android:title="@string/settings.hide_widget_title"
android:summary="@string/settings.hide_widget_summary"
android:key="hideWidget"