Design changes
- changed some style elements - playing queue now much better looking
This commit is contained in:
parent
594a328311
commit
0c3b78eca0
3 changed files with 23 additions and 15 deletions
|
|
@ -34,13 +34,15 @@ public class PlayingQueueAdapter extends ArrayAdapter<Song> {
|
|||
convertView = LayoutInflater.from(context).inflate(R.layout.item_playlist, parent, false);
|
||||
}
|
||||
final TextView title = (TextView) convertView.findViewById(R.id.song_title);
|
||||
final ImageView albumArt = (ImageView) convertView.findViewById(R.id.album_art);
|
||||
final ImageView playingIndicator = (ImageView) convertView.findViewById(R.id.playing_indicator);
|
||||
|
||||
title.setText(song.title);
|
||||
if (app.getMusicPlayerRemote().getCurrentSongId() == song.id) {
|
||||
albumArt.setImageResource(R.drawable.ic_speaker_white_48dp);
|
||||
if (app.getMusicPlayerRemote().getPosition() == position) {
|
||||
playingIndicator.setVisibility(View.VISIBLE);
|
||||
playingIndicator.setImageResource(R.drawable.ic_speaker_white_48dp);
|
||||
} else {
|
||||
albumArt.setImageBitmap(null);
|
||||
playingIndicator.setVisibility(View.GONE);
|
||||
playingIndicator.setImageBitmap(null);
|
||||
}
|
||||
return convertView;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,14 +7,6 @@
|
|||
android:descendantFocusability="blocksDescendants"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_gravity="center"
|
||||
android:id="@id/album_art"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="16dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_title"
|
||||
android:layout_width="0dp"
|
||||
|
|
@ -26,6 +18,12 @@
|
|||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/playing_indicator"
|
||||
style="@style/PlayingIndicator"
|
||||
android:layout_marginRight="-8dp"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/menu"
|
||||
style="@style/OverFlowButton"
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
<style name="Theme.MaterialMusic.Notification.Title" parent="@android:style/TextAppearance.StatusBar.EventContent.Title"/>
|
||||
|
||||
<style name="OverFlowButton">
|
||||
<item name="android:padding">20dp</item>
|
||||
<item name="android:layout_width">64dp</item>
|
||||
<item name="android:layout_height">64dp</item>
|
||||
<item name="android:padding">12dp</item>
|
||||
<item name="android:layout_width">48dp</item>
|
||||
<item name="android:layout_height">48dp</item>
|
||||
<item name="android:src">@drawable/ic_overflow</item>
|
||||
<item name="android:scaleType">fitXY</item>
|
||||
<item name="android:background">?selectableItemBackground</item>
|
||||
|
|
@ -24,6 +24,14 @@
|
|||
<item name="android:focusable">false</item>
|
||||
</style>
|
||||
|
||||
<style name="PlayingIndicator">
|
||||
<item name="android:layout_width">36dp</item>
|
||||
<item name="android:layout_height">36dp</item>
|
||||
<item name="android:padding">8dp</item>
|
||||
<item name="android:layout_gravity">center</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="PlayPauseFab" parent="PlayPauseFabParent"/>
|
||||
|
||||
<style name="NotificationButton" parent="NotificationButtonParent">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue