Fixed bug when hiding sliding panel. Updated changelog.
This commit is contained in:
parent
3e8e34a95c
commit
2755fd9cd8
7 changed files with 11 additions and 70 deletions
|
|
@ -44,6 +44,10 @@
|
|||
</li>
|
||||
<li><b>FIX:</b> Some icons not being colored correctly.
|
||||
</li>
|
||||
<li><b>FIX:</b> Images downloaded from Last.fm having low resolution. Note: If you currently
|
||||
have pixelated artist images you may have to clear the cache or reinstall phonograph for
|
||||
changes to take affect.
|
||||
</li>
|
||||
<li><b>TRANSLATIONS:</b> Translation updates from OneSky.
|
||||
</li>
|
||||
</ol>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.kabouzeid.gramophone.ui.activities;
|
|||
import android.animation.Animator;
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
|
@ -44,7 +43,6 @@ import com.kabouzeid.gramophone.ui.activities.tageditor.AlbumTagEditorActivity;
|
|||
import com.kabouzeid.gramophone.util.ColorUtil;
|
||||
import com.kabouzeid.gramophone.util.MusicUtil;
|
||||
import com.kabouzeid.gramophone.util.NavigationUtil;
|
||||
import com.kabouzeid.gramophone.util.PreferenceUtil;
|
||||
import com.kabouzeid.gramophone.util.Util;
|
||||
import com.kabouzeid.gramophone.util.ViewUtil;
|
||||
import com.nostra13.universalimageloader.core.DisplayImageOptions;
|
||||
|
|
@ -421,12 +419,4 @@ public class AlbumDetailActivity extends AbsSlidingMusicPanelActivity implements
|
|||
super.onMediaStoreChanged();
|
||||
reloadDataSet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||
super.onSharedPreferenceChanged(sharedPreferences, key);
|
||||
if (key.equals(PreferenceUtil.HIDE_BOTTOM_BAR)) {
|
||||
setUpRecyclerViewPadding();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,6 @@ package com.kabouzeid.gramophone.ui.activities;
|
|||
import android.animation.Animator;
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
|
@ -51,7 +50,6 @@ import com.kabouzeid.gramophone.ui.activities.base.AbsSlidingMusicPanelActivity;
|
|||
import com.kabouzeid.gramophone.util.ColorUtil;
|
||||
import com.kabouzeid.gramophone.util.MusicUtil;
|
||||
import com.kabouzeid.gramophone.util.NavigationUtil;
|
||||
import com.kabouzeid.gramophone.util.PreferenceUtil;
|
||||
import com.kabouzeid.gramophone.util.Util;
|
||||
import com.kabouzeid.gramophone.util.ViewUtil;
|
||||
import com.kabouzeid.gramophone.views.SquareIfPlaceImageView;
|
||||
|
|
@ -481,12 +479,4 @@ public class ArtistDetailActivity extends AbsSlidingMusicPanelActivity implement
|
|||
super.onMediaStoreChanged();
|
||||
reloadDataSets();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||
super.onSharedPreferenceChanged(sharedPreferences, key);
|
||||
if (key.equals(PreferenceUtil.HIDE_BOTTOM_BAR)) {
|
||||
setUpSongListPadding();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -93,12 +93,6 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
|
|||
@Nullable
|
||||
private View navigationDrawerHeader;
|
||||
|
||||
private ArrayList<HideBottomBarListener> hideBottomBarListeners = new ArrayList<>();
|
||||
|
||||
public interface HideBottomBarListener {
|
||||
void onBottomBarHiddenStateChanged(boolean hidden);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
|
@ -586,28 +580,6 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
|
|||
drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideBottomBar(boolean hide) {
|
||||
super.hideBottomBar(hide);
|
||||
for (HideBottomBarListener hideBottomBarListener : hideBottomBarListeners) {
|
||||
if (hideBottomBarListener != null) {
|
||||
hideBottomBarListener.onBottomBarHiddenStateChanged(hide);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addHideBottomBarListener(HideBottomBarListener listener) {
|
||||
if (listener != null) {
|
||||
hideBottomBarListeners.add(listener);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeHideBottomBarListener(HideBottomBarListener listener) {
|
||||
if (listener != null) {
|
||||
hideBottomBarListeners.remove(listener);
|
||||
}
|
||||
}
|
||||
|
||||
private void checkChangelog() {
|
||||
try {
|
||||
PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.kabouzeid.gramophone.ui.activities;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
|
|
@ -28,7 +27,6 @@ import com.kabouzeid.gramophone.model.smartplaylist.AbsSmartPlaylist;
|
|||
import com.kabouzeid.gramophone.ui.activities.base.AbsSlidingMusicPanelActivity;
|
||||
import com.kabouzeid.gramophone.util.NavigationUtil;
|
||||
import com.kabouzeid.gramophone.util.PlaylistsUtil;
|
||||
import com.kabouzeid.gramophone.util.PreferenceUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -210,14 +208,6 @@ public class PlaylistDetailActivity extends AbsSlidingMusicPanelActivity impleme
|
|||
reloadDataSet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||
super.onSharedPreferenceChanged(sharedPreferences, key);
|
||||
if (key.equals(PreferenceUtil.HIDE_BOTTOM_BAR)) {
|
||||
setUpRecyclerViewPadding();
|
||||
}
|
||||
}
|
||||
|
||||
private void checkIsEmpty() {
|
||||
empty.setVisibility(
|
||||
adapter.getItemCount() == 0 ? View.VISIBLE : View.GONE
|
||||
|
|
|
|||
|
|
@ -165,8 +165,6 @@ public abstract class AbsSlidingMusicPanelActivity extends AbsMusicServiceActivi
|
|||
setUpPlayPauseButton();
|
||||
setUpMiniPlayer();
|
||||
setUpSlidingPanel();
|
||||
// ensures that the fab and the mini player are hidden if the queue is empty
|
||||
getCurrentSong();
|
||||
|
||||
initAppearanceVarsFromSharedPrefs();
|
||||
PreferenceUtil.getInstance(this).registerOnSharedPreferenceChangedListener(this);
|
||||
|
|
@ -189,6 +187,11 @@ public abstract class AbsSlidingMusicPanelActivity extends AbsMusicServiceActivi
|
|||
onPanelSlide(slidingUpPanelLayout, 1);
|
||||
onPanelExpanded(slidingUpPanelLayout);
|
||||
}
|
||||
// ensures that the fab and the mini player are hidden if the queue is empty
|
||||
if (MusicPlayerRemote.getCurrentSong().id == -1) {
|
||||
playPauseFab.setVisibility(View.GONE);
|
||||
hideBottomBar(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -271,7 +274,7 @@ public abstract class AbsSlidingMusicPanelActivity extends AbsMusicServiceActivi
|
|||
setUpPlaybackControllerCard();
|
||||
break;
|
||||
case PreferenceUtil.HIDE_BOTTOM_BAR:
|
||||
hideBottomBar(PreferenceUtil.getInstance(this).hideBottomBar());
|
||||
recreate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import android.widget.TextView;
|
|||
|
||||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.interfaces.MusicServiceEventListener;
|
||||
import com.kabouzeid.gramophone.ui.activities.MainActivity;
|
||||
import com.kabouzeid.gramophone.views.FastScroller;
|
||||
|
||||
import butterknife.Bind;
|
||||
|
|
@ -24,7 +23,7 @@ import butterknife.ButterKnife;
|
|||
/**
|
||||
* @author Karim Abou Zeid (kabouzeid)
|
||||
*/
|
||||
public abstract class AbsMainActivityRecyclerViewFragment<A extends RecyclerView.Adapter, LM extends RecyclerView.LayoutManager> extends AbsMainActivityFragment implements OnOffsetChangedListener, MusicServiceEventListener, MainActivity.HideBottomBarListener {
|
||||
public abstract class AbsMainActivityRecyclerViewFragment<A extends RecyclerView.Adapter, LM extends RecyclerView.LayoutManager> extends AbsMainActivityFragment implements OnOffsetChangedListener, MusicServiceEventListener {
|
||||
|
||||
public static final String TAG = AbsMainActivityRecyclerViewFragment.class.getSimpleName();
|
||||
|
||||
|
|
@ -57,7 +56,6 @@ public abstract class AbsMainActivityRecyclerViewFragment<A extends RecyclerView
|
|||
|
||||
getMainActivity().addOnAppBarOffsetChangedListener(this);
|
||||
getMainActivity().addMusicStateListenerListener(this);
|
||||
getMainActivity().addHideBottomBarListener(this);
|
||||
|
||||
setUpRecyclerView();
|
||||
|
||||
|
|
@ -136,11 +134,6 @@ public abstract class AbsMainActivityRecyclerViewFragment<A extends RecyclerView
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBottomBarHiddenStateChanged(boolean hidden) {
|
||||
setUpRecyclerViewPadding();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enableViews() {
|
||||
super.enableViews();
|
||||
|
|
@ -182,7 +175,6 @@ public abstract class AbsMainActivityRecyclerViewFragment<A extends RecyclerView
|
|||
super.onDestroyView();
|
||||
getMainActivity().removeOnAppBarOffsetChangedListener(this);
|
||||
getMainActivity().removeMusicStateListenerListener(this);
|
||||
getMainActivity().removeHideBottomBarListener(this);
|
||||
ButterKnife.unbind(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue