Option to hide the new bottom bar

This commit is contained in:
Karim Abou Zeid 2015-08-13 00:37:49 +02:00
commit ec2e943a5d
13 changed files with 122 additions and 57 deletions

View file

@ -5,7 +5,6 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.kabouzeid.gramophone.R;
import com.kabouzeid.gramophone.helper.SortOrder;
@ -52,6 +51,8 @@ public final class PreferenceUtil {
public static final String IGNORE_MEDIA_STORE_ARTWORK = "ignore_media_store_artwork";
public static final String HIDE_BOTTOM_BAR = "hide_bottom_bar";
private static PreferenceUtil sInstance;
private final SharedPreferences mPreferences;
@ -186,35 +187,33 @@ public final class PreferenceUtil {
return mPreferences.getBoolean(IGNORE_MEDIA_STORE_ARTWORK, false);
}
@Nullable
public final boolean hideBottomBar() {
return mPreferences.getBoolean(HIDE_BOTTOM_BAR, false);
}
public final String getArtistSortOrder() {
return mPreferences.getString(ARTIST_SORT_ORDER, SortOrder.ArtistSortOrder.ARTIST_A_Z);
}
@Nullable
public final String getArtistSongSortOrder() {
return mPreferences.getString(ARTIST_SONG_SORT_ORDER,
SortOrder.ArtistSongSortOrder.SONG_A_Z);
}
@Nullable
public final String getArtistAlbumSortOrder() {
return mPreferences.getString(ARTIST_ALBUM_SORT_ORDER,
SortOrder.ArtistAlbumSortOrder.ALBUM_YEAR_ASC);
}
@Nullable
public final String getAlbumSortOrder() {
return mPreferences.getString(ALBUM_SORT_ORDER, SortOrder.AlbumSortOrder.ALBUM_A_Z);
}
@Nullable
public final String getAlbumSongSortOrder() {
return mPreferences.getString(ALBUM_SONG_SORT_ORDER,
SortOrder.AlbumSongSortOrder.SONG_TRACK_LIST);
}
@Nullable
public final String getSongSortOrder() {
return mPreferences.getString(SONG_SORT_ORDER, SortOrder.SongSortOrder.SONG_A_Z);
}