Prepared for beta release. Added Playing info toast on fab longclick. Synced translations.
This commit is contained in:
parent
5e1181f6ca
commit
bb60f33597
25 changed files with 558 additions and 266 deletions
|
|
@ -100,6 +100,12 @@ public class MusicControllerActivity extends AbsFabActivity {
|
|||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostCreate(Bundle savedInstanceState) {
|
||||
super.onPostCreate(savedInstanceState);
|
||||
getFab().setOnLongClickListener(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldColorStatusBar() {
|
||||
return false; // let other code handle this below
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import com.kabouzeid.gramophone.dialogs.ColorChooserDialog;
|
|||
import com.kabouzeid.gramophone.helper.MusicPlayerRemote;
|
||||
import com.kabouzeid.gramophone.misc.SmallOnGestureListener;
|
||||
import com.kabouzeid.gramophone.model.MusicRemoteEvent;
|
||||
import com.kabouzeid.gramophone.model.Song;
|
||||
import com.kabouzeid.gramophone.util.NavigationUtil;
|
||||
import com.kabouzeid.gramophone.views.PlayPauseDrawable;
|
||||
import com.melnykov.fab.FloatingActionButton;
|
||||
|
|
@ -97,6 +98,19 @@ public abstract class AbsFabActivity extends AbsBaseActivity {
|
|||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
getFab().setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View view) {
|
||||
final Song song = MusicPlayerRemote.getCurrentSong();
|
||||
if (song.id != -1) {
|
||||
Toast.makeText(AbsFabActivity.this, song.title + " - " + song.artistName, Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(AbsFabActivity.this, getResources().getString(R.string.nothing_playing), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void updateFabState() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue