Commit 44bc9f84233459c5c6140df18ba824afcd7cb042
1 parent
4bf5db10
Final commit, versión FINAL ESTABLE
Showing
3 changed files
with
18 additions
and
5 deletions
VitamioBundle/res/layout/mediacontroller.xml
... | ... | @@ -46,7 +46,7 @@ |
46 | 46 | android:background="#00000000" |
47 | 47 | android:contentDescription="@string/mediacontroller_play_pause" |
48 | 48 | android:gravity="center" |
49 | - android:src="@drawable/mediacontroller_pause_button" /> | |
49 | + android:src="@android:drawable/ic_media_pause" /> | |
50 | 50 | |
51 | 51 | <ImageButton |
52 | 52 | android:id="@+id/ImageButton01" |
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | android:background="#00000000" |
58 | 58 | android:gravity="center" |
59 | 59 | android:scaleType="fitCenter" |
60 | - android:src="@drawable/mediacontroller_ff_left" /> | |
60 | + android:src="@android:drawable/ic_media_rew" /> | |
61 | 61 | |
62 | 62 | <ImageButton |
63 | 63 | android:id="@+id/ImageButton02" |
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | android:background="#00000000" |
71 | 71 | android:gravity="center" |
72 | 72 | android:scaleType="fitCenter" |
73 | - android:src="@drawable/mediacontroller_ff_right" /> | |
73 | + android:src="@android:drawable/ic_media_ff" /> | |
74 | 74 | |
75 | 75 | </RelativeLayout> |
76 | 76 | ... | ... |
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() { | ... | ... |
src/com/upc/pbe/upcnews/VideoActivity.java
... | ... | @@ -20,6 +20,7 @@ import android.net.TrafficStats; |
20 | 20 | import android.os.AsyncTask; |
21 | 21 | import android.os.Bundle; |
22 | 22 | import android.util.Log; |
23 | +import android.view.KeyEvent; | |
23 | 24 | import android.view.View; |
24 | 25 | import android.widget.Toast; |
25 | 26 | |
... | ... | @@ -196,6 +197,17 @@ public class VideoActivity extends Activity { |
196 | 197 | } |
197 | 198 | |
198 | 199 | @Override |
200 | + public boolean onKeyDown(int keyCode, KeyEvent event) { | |
201 | + // Determina el funcionament al apretar la tecla de tornar enrere | |
202 | + if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) | |
203 | + { | |
204 | + quitPlayer(); | |
205 | + return true; | |
206 | + } | |
207 | + return super.onKeyDown(keyCode, event); | |
208 | + } | |
209 | + | |
210 | + @Override | |
199 | 211 | public void onConfigurationChanged(Configuration newConfig) { |
200 | 212 | if (video != null) |
201 | 213 | video.setVideoLayout(VideoView.VIDEO_LAYOUT_SCALE, 0); | ... | ... |