Merge branch 'master' into multi-select
This commit is contained in:
commit
493018f021
9 changed files with 39 additions and 31 deletions
|
|
@ -24,8 +24,8 @@ android {
|
|||
applicationId "com.kabouzeid.gramophone"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 22
|
||||
versionCode 24
|
||||
versionName "0.9.9.4b"
|
||||
versionCode 25
|
||||
versionName "0.9.10b"
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
|
|
@ -69,7 +69,7 @@ dependencies {
|
|||
compile 'de.hdodenhof:circleimageview:1.3.0'
|
||||
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
|
||||
|
||||
compile 'com.afollestad:material-dialogs:0.7.4.1'
|
||||
compile 'com.afollestad:material-dialogs:0.7.4.2'
|
||||
compile 'com.jpardogo.materialtabstrip:library:1.0.9'
|
||||
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
|
||||
compile 'com.melnykov:floatingactionbutton:1.3.0'
|
||||
|
|
|
|||
|
|
@ -796,7 +796,7 @@ public class MusicService extends Service implements MediaPlayer.OnPreparedListe
|
|||
//to let other apps know whats playing. i.E. last.fm (scrobbling) or musixmatch
|
||||
final Intent intent = new Intent(what);
|
||||
final int position = getPosition();
|
||||
if(position >= 0) {
|
||||
if (position >= 0 && !playingQueue.isEmpty()) {
|
||||
final Song currentSong = playingQueue.get(position);
|
||||
intent.putExtra("id", currentSong.id);
|
||||
intent.putExtra("artist", currentSong.artistName);
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ public class AlbumDetailActivity extends AbsFabActivity implements PaletteColorH
|
|||
private int titleViewHeight;
|
||||
private int albumArtViewHeight;
|
||||
private int toolbarColor;
|
||||
private int bottomOffset;
|
||||
|
||||
private final SmallObservableScrollViewCallbacks observableScrollViewCallbacks = new SmallObservableScrollViewCallbacks() {
|
||||
@Override
|
||||
|
|
@ -92,10 +93,6 @@ public class AlbumDetailActivity extends AbsFabActivity implements PaletteColorH
|
|||
titleTranslationY = Math.max(headerOffset, titleTranslationY);
|
||||
|
||||
ViewHelper.setTranslationY(albumTitleView, titleTranslationY);
|
||||
|
||||
// Translate FAB
|
||||
int fabTranslationY = titleTranslationY + titleViewHeight - (getFab().getHeight() / 2);
|
||||
ViewHelper.setTranslationY(getFab(), fabTranslationY);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -155,6 +152,7 @@ public class AlbumDetailActivity extends AbsFabActivity implements PaletteColorH
|
|||
}
|
||||
|
||||
private void setUpObservableListViewParams() {
|
||||
bottomOffset = getResources().getDimensionPixelSize(R.dimen.bottom_offset_fab_activity);
|
||||
albumArtViewHeight = getResources().getDimensionPixelSize(R.dimen.header_image_height);
|
||||
toolbarColor = DialogUtils.resolveColor(this, R.attr.default_bar_color);
|
||||
int toolbarHeight = Util.getActionBarSize(this);
|
||||
|
|
@ -259,7 +257,7 @@ public class AlbumDetailActivity extends AbsFabActivity implements PaletteColorH
|
|||
|
||||
private void setUpListView() {
|
||||
recyclerView.setScrollViewCallbacks(observableScrollViewCallbacks);
|
||||
recyclerView.setPadding(0, albumArtViewHeight + titleViewHeight, 0, 0);
|
||||
recyclerView.setPadding(0, albumArtViewHeight + titleViewHeight, 0, bottomOffset);
|
||||
final View contentView = getWindow().getDecorView().findViewById(android.R.id.content);
|
||||
contentView.post(new Runnable() {
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ public class ArtistDetailActivity extends AbsFabActivity implements PaletteColor
|
|||
private int titleViewHeight;
|
||||
private int artistImageViewHeight;
|
||||
private int toolbarColor;
|
||||
private int bottomOffset;
|
||||
|
||||
private View songListHeader;
|
||||
private RecyclerView albumRecyclerView;
|
||||
|
|
@ -107,10 +108,6 @@ public class ArtistDetailActivity extends AbsFabActivity implements PaletteColor
|
|||
titleTranslationY = Math.max(headerOffset, titleTranslationY);
|
||||
|
||||
ViewHelper.setTranslationY(artistNameTv, titleTranslationY);
|
||||
|
||||
// Translate FAB
|
||||
int fabTranslationY = titleTranslationY + titleViewHeight - (getFab().getHeight() / 2);
|
||||
ViewHelper.setTranslationY(getFab(), fabTranslationY);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -168,6 +165,7 @@ public class ArtistDetailActivity extends AbsFabActivity implements PaletteColor
|
|||
}
|
||||
|
||||
private void setUpObservableListViewParams() {
|
||||
bottomOffset = getResources().getDimensionPixelSize(R.dimen.bottom_offset_fab_activity);
|
||||
artistImageViewHeight = getResources().getDimensionPixelSize(R.dimen.header_image_height);
|
||||
toolbarColor = DialogUtils.resolveColor(this, R.attr.default_bar_color);
|
||||
int toolbarHeight = Util.getActionBarSize(this);
|
||||
|
|
@ -207,7 +205,7 @@ public class ArtistDetailActivity extends AbsFabActivity implements PaletteColor
|
|||
|
||||
private void setUpSongListView() {
|
||||
songListView.setScrollViewCallbacks(observableScrollViewCallbacks);
|
||||
songListView.setPadding(0, artistImageViewHeight + titleViewHeight, 0, 0);
|
||||
songListView.setPadding(0, artistImageViewHeight + titleViewHeight, 0, bottomOffset);
|
||||
songListView.addHeaderView(songListHeader);
|
||||
|
||||
final ArrayList<Song> songs = ArtistSongLoader.getArtistSongList(this, artist.id);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public abstract class AbsMainActivityFragment extends Fragment implements KabVie
|
|||
}
|
||||
|
||||
protected int getBottomPadding() {
|
||||
return 0;
|
||||
return getResources().getDimensionPixelSize(R.dimen.bottom_offset_fab_activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -74,12 +74,18 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<com.melnykov.fab.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
style="@style/PlayPauseFab"
|
||||
android:layout_gravity="right|end"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|right|bottom"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<com.melnykov.fab.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
style="@style/PlayPauseFab"
|
||||
android:layout_margin="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
|
@ -74,12 +74,18 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<com.melnykov.fab.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
style="@style/PlayPauseFab"
|
||||
android:layout_gravity="right|end"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|right|bottom"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<com.melnykov.fab.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
style="@style/PlayPauseFab"
|
||||
android:layout_margin="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
android:clipToPadding="false"
|
||||
android:divider="@null"
|
||||
android:dividerHeight="0px"
|
||||
android:paddingBottom="@dimen/playlist_list_bottom_offset"
|
||||
android:paddingBottom="@dimen/bottom_offset_fab_activity"
|
||||
android:scrollbars="vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -48,5 +48,5 @@ http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
|
|||
<dimen name="list_padding_vertical">2dp</dimen>
|
||||
|
||||
<dimen name="notification_albumart_size">128dp</dimen>
|
||||
<dimen name="playlist_list_bottom_offset">86dp</dimen>
|
||||
<dimen name="bottom_offset_fab_activity">86dp</dimen>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue