Commit c1d47b1f3a2ef09756486db04bf20630a34040e2

Authored by Imanol-Mikel Barba Sabariego
1 parent c453fa10

Añadidos botones finales, usando los de android por defecto para ahorrar recurso…

…s, aun no hacen nada, estoy en ello
VitamioBundle/res/drawable-hdpi/mediacontroller_ff_left.png deleted

865 Bytes

VitamioBundle/res/drawable-hdpi/mediacontroller_ff_right.png deleted

860 Bytes

VitamioBundle/res/layout/mediacontroller.xml
... ... @@ -40,37 +40,63 @@
40 40  
41 41 <ImageButton
42 42 android:id="@+id/mediacontroller_play_pause"
43   - android:layout_width="54.6dip"
  43 + android:layout_width="30dip"
44 44 android:layout_height="30dip"
45 45 android:layout_centerHorizontal="true"
  46 + android:layout_marginLeft="10dip"
  47 + android:layout_marginRight="10dip"
46 48 android:background="#00000000"
47 49 android:contentDescription="@string/mediacontroller_play_pause"
48 50 android:gravity="center"
49   - android:src="@drawable/mediacontroller_pause_button" />
  51 + android:src="@android:drawable/ic_media_pause" />
50 52  
51 53 <ImageButton
52 54 android:id="@+id/ImageButton01"
53   - android:layout_width="54.6dip"
  55 + android:layout_width="30dip"
54 56 android:layout_height="30dip"
55   - android:layout_marginRight="20dp"
  57 + android:layout_marginLeft="10dip"
  58 + android:layout_marginRight="10dip"
56 59 android:layout_toLeftOf="@+id/mediacontroller_play_pause"
57 60 android:background="#00000000"
58 61 android:gravity="center"
59 62 android:scaleType="fitCenter"
60   - android:src="@drawable/mediacontroller_ff_left" />
  63 + android:src="@android:drawable/ic_media_rew" />
61 64  
62 65 <ImageButton
63 66 android:id="@+id/ImageButton02"
64   - android:layout_width="54.6dip"
  67 + android:layout_width="30dip"
65 68 android:layout_height="30dip"
66   - android:layout_alignParentTop="true"
67   - android:layout_marginLeft="20dip"
68   - android:layout_marginRight="40dip"
  69 + android:layout_marginLeft="10dip"
  70 + android:layout_marginRight="10dip"
69 71 android:layout_toRightOf="@+id/mediacontroller_play_pause"
70 72 android:background="#00000000"
71 73 android:gravity="center"
72 74 android:scaleType="fitCenter"
73   - android:src="@drawable/mediacontroller_ff_right" />
  75 + android:src="@android:drawable/ic_media_ff" />
  76 +
  77 + <ImageButton
  78 + android:id="@+id/ImageButton04"
  79 + android:layout_width="30dip"
  80 + android:layout_height="30dip"
  81 + android:layout_marginLeft="10dip"
  82 + android:layout_marginRight="20dip"
  83 + android:layout_toRightOf="@id/ImageButton02"
  84 + android:background="#00000000"
  85 + android:gravity="center"
  86 + android:scaleType="fitCenter"
  87 + android:src="@android:drawable/ic_media_next" />
  88 +
  89 + <ImageButton
  90 + android:id="@+id/ImageButton03"
  91 + android:layout_width="30dip"
  92 + android:layout_height="30dip"
  93 + android:layout_marginLeft="20dip"
  94 + android:layout_marginRight="10dip"
  95 + android:layout_toLeftOf="@id/ImageButton01"
  96 + android:background="#00000000"
  97 + android:gravity="center"
  98 + android:scaleType="fitCenter"
  99 + android:src="@android:drawable/ic_media_previous" />
74 100  
75 101 </RelativeLayout>
76 102  
... ...
VitamioBundle/src/io/vov/vitamio/widget/MediaController.java
... ... @@ -20,6 +20,7 @@ package io.vov.vitamio.widget;
20 20 import io.vov.utils.Log;
21 21 import io.vov.utils.StringUtils;
22 22 import io.vov.vitamio.R;
  23 +import android.R.drawable;
23 24 import android.content.Context;
24 25 import android.graphics.Rect;
25 26 import android.media.AudioManager;
... ... @@ -468,9 +469,9 @@ public class MediaController extends FrameLayout {
468 469 return;
469 470  
470 471 if (mPlayer.isPlaying())
471   - mPauseButton.setImageResource(R.drawable.mediacontroller_pause_button);
  472 + mPauseButton.setImageResource(drawable.ic_media_pause);
472 473 else
473   - mPauseButton.setImageResource(R.drawable.mediacontroller_play_button);
  474 + mPauseButton.setImageResource(drawable.ic_media_play);
474 475 }
475 476  
476 477 private void doPauseResume() {
... ...