mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 09:58:08 +00:00
Use material icons in MPRIS activity
Summary: The previous icons were old (pre-Material, maybe even pre-Holo). The recommended practice now is to add the icons directly to your app, so I added the material icons. Note that the vector version is used; these are automatically converted to bitmaps for older android versions. Reviewers: #kde_connect Subscribers: apol Differential Revision: https://phabricator.kde.org/D8955
This commit is contained in:
parent
cc8330a079
commit
044261ceb1
Binary file not shown.
Before Width: | Height: | Size: 823 B |
Binary file not shown.
Before Width: | Height: | Size: 497 B |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB |
9
res/drawable/ic_fast_forward_black.xml
Normal file
9
res/drawable/ic_fast_forward_black.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M4,18l8.5,-6L4,6v12zM13,6v12l8.5,-6L13,6z"/>
|
||||
</vector>
|
9
res/drawable/ic_next_black.xml
Normal file
9
res/drawable/ic_next_black.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z"/>
|
||||
</vector>
|
9
res/drawable/ic_pause_black.xml
Normal file
9
res/drawable/ic_pause_black.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z"/>
|
||||
</vector>
|
9
res/drawable/ic_play_black.xml
Normal file
9
res/drawable/ic_play_black.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M8,5v14l11,-7z"/>
|
||||
</vector>
|
9
res/drawable/ic_previous_black.xml
Normal file
9
res/drawable/ic_previous_black.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z"/>
|
||||
</vector>
|
9
res/drawable/ic_rewind_black.xml
Normal file
9
res/drawable/ic_rewind_black.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11,18L11,6l-8.5,6 8.5,6zM11.5,12l8.5,6L20,6l-8.5,6z"/>
|
||||
</vector>
|
9
res/drawable/ic_volume_black.xml
Normal file
9
res/drawable/ic_volume_black.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M3,9v6h4l5,5L12,4L7,9L3,9zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z"/>
|
||||
</vector>
|
@ -46,7 +46,7 @@
|
||||
android:layout_height="75dip"
|
||||
app:maxWidth="300dip"
|
||||
android:id="@+id/play_button"
|
||||
android:src="@android:drawable/ic_media_play"
|
||||
android:src="@drawable/ic_play_black"
|
||||
android:contentDescription="@string/mpris_play"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0"
|
||||
@ -65,7 +65,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:id="@+id/prev_button"
|
||||
android:src="@android:drawable/ic_media_previous"
|
||||
android:src="@drawable/ic_previous_black"
|
||||
android:contentDescription="@string/mpris_previous"
|
||||
android:layout_weight="0.25"
|
||||
/>
|
||||
@ -74,7 +74,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:id="@+id/rew_button"
|
||||
android:src="@android:drawable/ic_media_rew"
|
||||
android:src="@drawable/ic_rewind_black"
|
||||
android:contentDescription="@string/mpris_rew"
|
||||
android:layout_weight="0.25"
|
||||
/>
|
||||
@ -83,7 +83,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:id="@+id/ff_button"
|
||||
android:src="@android:drawable/ic_media_ff"
|
||||
android:src="@drawable/ic_fast_forward_black"
|
||||
android:contentDescription="@string/mpris_ff"
|
||||
android:layout_weight="0.25"
|
||||
/>
|
||||
@ -92,7 +92,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:id="@+id/next_button"
|
||||
android:src="@android:drawable/ic_media_next"
|
||||
android:src="@drawable/ic_next_black"
|
||||
android:contentDescription="@string/mpris_next"
|
||||
android:layout_weight="0.25"
|
||||
/>
|
||||
@ -152,7 +152,7 @@
|
||||
android:id="@+id/imageView"
|
||||
android:layout_weight="0"
|
||||
android:contentDescription="@string/mpris_volume"
|
||||
android:src="@drawable/ic_volume"
|
||||
android:src="@drawable/ic_volume_black"
|
||||
/>
|
||||
|
||||
|
||||
|
@ -211,10 +211,10 @@ public class MprisActivity extends ActionBarActivity {
|
||||
|
||||
boolean isPlaying = playerStatus.isPlaying();
|
||||
if (isPlaying) {
|
||||
((ImageButton) findViewById(R.id.play_button)).setImageResource(android.R.drawable.ic_media_pause);
|
||||
((ImageButton) findViewById(R.id.play_button)).setImageResource(R.drawable.ic_pause_black);
|
||||
findViewById(R.id.play_button).setVisibility(playerStatus.isPauseAllowed() ? View.VISIBLE : View.GONE);
|
||||
} else {
|
||||
((ImageButton) findViewById(R.id.play_button)).setImageResource(android.R.drawable.ic_media_play);
|
||||
((ImageButton) findViewById(R.id.play_button)).setImageResource(R.drawable.ic_play_black);
|
||||
findViewById(R.id.play_button).setVisibility(playerStatus.isPlayAllowed() ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user