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,7 +46,7 @@ | ||
46 | android:background="#00000000" | 46 | android:background="#00000000" |
47 | android:contentDescription="@string/mediacontroller_play_pause" | 47 | android:contentDescription="@string/mediacontroller_play_pause" |
48 | android:gravity="center" | 48 | android:gravity="center" |
49 | - android:src="@drawable/mediacontroller_pause_button" /> | 49 | + android:src="@android:drawable/ic_media_pause" /> |
50 | 50 | ||
51 | <ImageButton | 51 | <ImageButton |
52 | android:id="@+id/ImageButton01" | 52 | android:id="@+id/ImageButton01" |
@@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
57 | android:background="#00000000" | 57 | android:background="#00000000" |
58 | android:gravity="center" | 58 | android:gravity="center" |
59 | android:scaleType="fitCenter" | 59 | android:scaleType="fitCenter" |
60 | - android:src="@drawable/mediacontroller_ff_left" /> | 60 | + android:src="@android:drawable/ic_media_rew" /> |
61 | 61 | ||
62 | <ImageButton | 62 | <ImageButton |
63 | android:id="@+id/ImageButton02" | 63 | android:id="@+id/ImageButton02" |
@@ -70,7 +70,7 @@ | @@ -70,7 +70,7 @@ | ||
70 | android:background="#00000000" | 70 | android:background="#00000000" |
71 | android:gravity="center" | 71 | android:gravity="center" |
72 | android:scaleType="fitCenter" | 72 | android:scaleType="fitCenter" |
73 | - android:src="@drawable/mediacontroller_ff_right" /> | 73 | + android:src="@android:drawable/ic_media_ff" /> |
74 | 74 | ||
75 | </RelativeLayout> | 75 | </RelativeLayout> |
76 | 76 |
VitamioBundle/src/io/vov/vitamio/widget/MediaController.java
@@ -20,6 +20,7 @@ package io.vov.vitamio.widget; | @@ -20,6 +20,7 @@ package io.vov.vitamio.widget; | ||
20 | import io.vov.utils.Log; | 20 | import io.vov.utils.Log; |
21 | import io.vov.utils.StringUtils; | 21 | import io.vov.utils.StringUtils; |
22 | import io.vov.vitamio.R; | 22 | import io.vov.vitamio.R; |
23 | +import android.R.drawable; | ||
23 | import android.content.Context; | 24 | import android.content.Context; |
24 | import android.graphics.Rect; | 25 | import android.graphics.Rect; |
25 | import android.media.AudioManager; | 26 | import android.media.AudioManager; |
@@ -468,9 +469,9 @@ public class MediaController extends FrameLayout { | @@ -468,9 +469,9 @@ public class MediaController extends FrameLayout { | ||
468 | return; | 469 | return; |
469 | 470 | ||
470 | if (mPlayer.isPlaying()) | 471 | if (mPlayer.isPlaying()) |
471 | - mPauseButton.setImageResource(R.drawable.mediacontroller_pause_button); | 472 | + mPauseButton.setImageResource(drawable.ic_media_pause); |
472 | else | 473 | else |
473 | - mPauseButton.setImageResource(R.drawable.mediacontroller_play_button); | 474 | + mPauseButton.setImageResource(drawable.ic_media_play); |
474 | } | 475 | } |
475 | 476 | ||
476 | private void doPauseResume() { | 477 | private void doPauseResume() { |
src/com/upc/pbe/upcnews/VideoActivity.java
@@ -20,6 +20,7 @@ import android.net.TrafficStats; | @@ -20,6 +20,7 @@ import android.net.TrafficStats; | ||
20 | import android.os.AsyncTask; | 20 | import android.os.AsyncTask; |
21 | import android.os.Bundle; | 21 | import android.os.Bundle; |
22 | import android.util.Log; | 22 | import android.util.Log; |
23 | +import android.view.KeyEvent; | ||
23 | import android.view.View; | 24 | import android.view.View; |
24 | import android.widget.Toast; | 25 | import android.widget.Toast; |
25 | 26 | ||
@@ -196,6 +197,17 @@ public class VideoActivity extends Activity { | @@ -196,6 +197,17 @@ public class VideoActivity extends Activity { | ||
196 | } | 197 | } |
197 | 198 | ||
198 | @Override | 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 | public void onConfigurationChanged(Configuration newConfig) { | 211 | public void onConfigurationChanged(Configuration newConfig) { |
200 | if (video != null) | 212 | if (video != null) |
201 | video.setVideoLayout(VideoView.VIDEO_LAYOUT_SCALE, 0); | 213 | video.setVideoLayout(VideoView.VIDEO_LAYOUT_SCALE, 0); |