Skip to content
Snippets Groups Projects
Commit b3dd82b2 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Improve playback speed dialog for DPAD navigation

(cherry picked from commit f569167a)
parent 36f325ee
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@
android:id="@+id/playback_speed_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:src="?attr/ic_speed_normal_style" />
<TextView
......
......@@ -38,7 +38,7 @@ import org.videolan.vlc.gui.PlaybackServiceFragment;
import org.videolan.vlc.gui.helpers.UiTools;
import org.videolan.vlc.util.Strings;
public class PlaybackSpeedDialog extends DialogFragment implements PlaybackService.Client.Callback {
public class PlaybackSpeedDialog extends DialogFragment implements PlaybackService.Client.Callback, View.OnFocusChangeListener {
public final static String TAG = "VLC/PlaybackSpeedDialog";
......@@ -82,6 +82,7 @@ public class PlaybackSpeedDialog extends DialogFragment implements PlaybackServi
mPlaybackSpeedMinus = (ImageView) view.findViewById(R.id.playback_speed_minus);
mSeekSpeed.setOnSeekBarChangeListener(mSeekBarListener);
mSeekSpeed.setOnFocusChangeListener(this);
mPlaybackSpeedIcon.setOnClickListener(mResetListener);
mPlaybackSpeedPlus.setOnClickListener(mSpeedUpListener);
mPlaybackSpeedMinus.setOnClickListener(mSpeedDownListener);
......@@ -209,4 +210,10 @@ public class PlaybackSpeedDialog extends DialogFragment implements PlaybackServi
mService = null;
}
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (v.getId() == R.id.playback_speed_seek) {
mSeekBarAction = hasFocus;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment