diff --git a/VitamioBundle/res/layout/mediacontroller.xml b/VitamioBundle/res/layout/mediacontroller.xml index 65b08da..a693ae9 100644 --- a/VitamioBundle/res/layout/mediacontroller.xml +++ b/VitamioBundle/res/layout/mediacontroller.xml @@ -46,7 +46,7 @@ android:background="#00000000" android:contentDescription="@string/mediacontroller_play_pause" android:gravity="center" - android:src="@drawable/mediacontroller_pause_button" /> + android:src="@android:drawable/ic_media_pause" /> + android:src="@android:drawable/ic_media_rew" /> + android:src="@android:drawable/ic_media_ff" /> diff --git a/VitamioBundle/src/io/vov/vitamio/widget/MediaController.java b/VitamioBundle/src/io/vov/vitamio/widget/MediaController.java index a695f03..8fc01ee 100644 --- a/VitamioBundle/src/io/vov/vitamio/widget/MediaController.java +++ b/VitamioBundle/src/io/vov/vitamio/widget/MediaController.java @@ -20,6 +20,7 @@ package io.vov.vitamio.widget; import io.vov.utils.Log; import io.vov.utils.StringUtils; import io.vov.vitamio.R; +import android.R.drawable; import android.content.Context; import android.graphics.Rect; import android.media.AudioManager; @@ -468,9 +469,9 @@ public class MediaController extends FrameLayout { return; if (mPlayer.isPlaying()) - mPauseButton.setImageResource(R.drawable.mediacontroller_pause_button); + mPauseButton.setImageResource(drawable.ic_media_pause); else - mPauseButton.setImageResource(R.drawable.mediacontroller_play_button); + mPauseButton.setImageResource(drawable.ic_media_play); } private void doPauseResume() { diff --git a/src/com/upc/pbe/upcnews/VideoActivity.java b/src/com/upc/pbe/upcnews/VideoActivity.java index e12c66f..e275f32 100644 --- a/src/com/upc/pbe/upcnews/VideoActivity.java +++ b/src/com/upc/pbe/upcnews/VideoActivity.java @@ -20,6 +20,7 @@ import android.net.TrafficStats; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; +import android.view.KeyEvent; import android.view.View; import android.widget.Toast; @@ -196,6 +197,17 @@ public class VideoActivity extends Activity { } @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + // Determina el funcionament al apretar la tecla de tornar enrere + if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) + { + quitPlayer(); + return true; + } + return super.onKeyDown(keyCode, event); + } + + @Override public void onConfigurationChanged(Configuration newConfig) { if (video != null) video.setVideoLayout(VideoView.VIDEO_LAYOUT_SCALE, 0);