[Android] AudioPlayerActivity: use image resources consistently

Edward Wang git at videolan.org
Sun Nov 4 04:19:59 CET 2012


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Sat Nov  3 23:18:56 2012 -0400| [72f688a62b72a0ab41af702504d9d2ebaf82f402] | committer: Edward Wang

AudioPlayerActivity: use image resources consistently

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=72f688a62b72a0ab41af702504d9d2ebaf82f402
---

 vlc-android/res/layout/audio_player.xml                |   16 ++++++++++++----
 .../videolan/vlc/gui/audio/AudioPlayerActivity.java    |    4 ++--
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/vlc-android/res/layout/audio_player.xml b/vlc-android/res/layout/audio_player.xml
index af4df2d..0b5dcea 100644
--- a/vlc-android/res/layout/audio_player.xml
+++ b/vlc-android/res/layout/audio_player.xml
@@ -155,13 +155,17 @@
         android:gravity="center"
         android:layout_margin="10dip">
         <ImageButton
-            android:background="@drawable/ic_backward"
+            android:src="@drawable/ic_backward"
+            android:scaleType="fitXY"
+            android:background="#00000000"
             android:layout_height="70dip"
             android:layout_width="70dip"
             android:id="@+id/previous"
             android:onClick="onPreviousClick" />
         <ImageButton
-            android:background="@drawable/ic_pause"
+            android:src="@drawable/ic_pause"
+            android:scaleType="fitXY"
+            android:background="#00000000"
             android:layout_width="70dip"
             android:layout_height="70dip"
             android:layout_marginLeft="10dip"
@@ -171,15 +175,19 @@
 
         <ImageButton
             android:id="@+id/stop"
+            android:scaleType="fitXY"
+            android:background="#00000000"
             android:layout_width="70dip"
             android:layout_height="70dip"
             android:layout_marginLeft="10dip"
             android:layout_marginRight="10dip"
-            android:background="@drawable/ic_stop"
+            android:src="@drawable/ic_stop"
             android:onClick="onStopClick" />
 
         <ImageButton
-            android:background="@drawable/ic_forward"
+            android:src="@drawable/ic_forward"
+            android:scaleType="fitXY"
+            android:background="#00000000"
             android:layout_height="70dip"
             android:layout_width="70dip"
             android:id="@+id/next"
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
index 9d3b719..c73e875 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
@@ -172,9 +172,9 @@ public class AudioPlayerActivity extends Activity implements IAudioPlayer {
         if (!mIsTracking)
             mTimeline.setProgress(time);
         if (mAudioController.isPlaying()) {
-            mPlayPause.setBackgroundResource(R.drawable.ic_pause);
+            mPlayPause.setImageResource(R.drawable.ic_pause);
         } else {
-            mPlayPause.setBackgroundResource(R.drawable.ic_play);
+            mPlayPause.setImageResource(R.drawable.ic_play);
         }
         if (mAudioController.isShuffling()) {
             mShuffle.setImageResource(R.drawable.ic_shuffle_glow);



More information about the Android mailing list