Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Casanowow Life for love
VLC-Android
Commits
5eea8d85
Commit
5eea8d85
authored
May 23, 2017
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Option to disable seek on double tap
parent
2abb3c9f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
vlc-android/res/values/strings.xml
vlc-android/res/values/strings.xml
+2
-0
vlc-android/res/xml/preferences_video.xml
vlc-android/res/xml/preferences_video.xml
+5
-0
vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesVideo.java
...org/videolan/vlc/gui/tv/preferences/PreferencesVideo.java
+1
-0
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
...d/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+13
-4
No files found.
vlc-android/res/values/strings.xml
View file @
5eea8d85
...
@@ -299,6 +299,8 @@
...
@@ -299,6 +299,8 @@
<string
name=
"enable_volume_gesture_summary"
>
Control volume by gesture during video playback
</string>
<string
name=
"enable_volume_gesture_summary"
>
Control volume by gesture during video playback
</string>
<string
name=
"enable_seek_buttons"
>
Enable seek buttons
</string>
<string
name=
"enable_seek_buttons"
>
Enable seek buttons
</string>
<string
name=
"enable_seek_buttons_summary"
>
Show rewind and forward buttons on the video interface
</string>
<string
name=
"enable_seek_buttons_summary"
>
Show rewind and forward buttons on the video interface
</string>
<string
name=
"enable_double_tap_seek_title"
>
Double tap to seek
</string>
<string
name=
"enable_double_tap_seek_summary"
>
Double tap on screen edges to seek by 10 seconds
</string>
<string
name=
"subtitles_prefs_category"
>
Subtitles
</string>
<string
name=
"subtitles_prefs_category"
>
Subtitles
</string>
<string
name=
"subtitles_size_title"
>
Subtitles Size
</string>
<string
name=
"subtitles_size_title"
>
Subtitles Size
</string>
...
...
vlc-android/res/xml/preferences_video.xml
View file @
5eea8d85
...
@@ -50,6 +50,11 @@
...
@@ -50,6 +50,11 @@
android:key=
"dialog_confirm_resume"
android:key=
"dialog_confirm_resume"
android:summary=
"@string/confirm_resume_summary"
android:summary=
"@string/confirm_resume_summary"
android:title=
"@string/confirm_resume_title"
/>
android:title=
"@string/confirm_resume_title"
/>
<CheckBoxPreference
android:defaultValue=
"true"
android:key=
"enable_double_tap_seek"
android:summary=
"@string/enable_double_tap_seek_summary"
android:title=
"@string/enable_double_tap_seek_title"
/>
<CheckBoxPreference
<CheckBoxPreference
android:defaultValue=
"false"
android:defaultValue=
"false"
android:key=
"enable_seek_buttons"
android:key=
"enable_seek_buttons"
...
...
vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesVideo.java
View file @
5eea8d85
...
@@ -50,6 +50,7 @@ public class PreferencesVideo extends BasePreferenceFragment {
...
@@ -50,6 +50,7 @@ public class PreferencesVideo extends BasePreferenceFragment {
findPreference
(
"force_list_portrait"
).
setVisible
(
false
);
findPreference
(
"force_list_portrait"
).
setVisible
(
false
);
findPreference
(
"save_brightness"
).
setVisible
(
false
);
findPreference
(
"save_brightness"
).
setVisible
(
false
);
findPreference
(
"video_min_group_length"
).
setVisible
(
false
);
findPreference
(
"video_min_group_length"
).
setVisible
(
false
);
findPreference
(
"enable_double_tap_seek"
).
setVisible
(
false
);
findPreference
(
"enable_volume_gesture"
).
setVisible
(
AndroidDevices
.
hasTsp
());
findPreference
(
"enable_volume_gesture"
).
setVisible
(
AndroidDevices
.
hasTsp
());
findPreference
(
"enable_brightness_gesture"
).
setVisible
(
AndroidDevices
.
hasTsp
());
findPreference
(
"enable_brightness_gesture"
).
setVisible
(
AndroidDevices
.
hasTsp
());
}
}
...
...
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
View file @
5eea8d85
...
@@ -203,6 +203,10 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
...
@@ -203,6 +203,10 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
private
int
mCurrentSize
;
private
int
mCurrentSize
;
private
SharedPreferences
mSettings
;
private
SharedPreferences
mSettings
;
private
static
final
int
TOUCH_FLAG_AUDIO_VOLUME
=
1
;
private
static
final
int
TOUCH_FLAG_BRIGHTNESS
=
1
<<
1
;
private
static
final
int
TOUCH_FLAG_SEEK
=
1
<<
2
;
private
int
mTouchControls
=
0
;
private
int
mTouchControls
=
0
;
/** Overlay */
/** Overlay */
...
@@ -387,8 +391,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
...
@@ -387,8 +391,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mSettings
=
PreferenceManager
.
getDefaultSharedPreferences
(
this
);
mSettings
=
PreferenceManager
.
getDefaultSharedPreferences
(
this
);
if
(!
VLCApplication
.
showTvUi
())
{
if
(!
VLCApplication
.
showTvUi
())
{
mTouchControls
=
(
mSettings
.
getBoolean
(
"enable_volume_gesture"
,
true
)
?
1
:
0
)
mTouchControls
=
(
mSettings
.
getBoolean
(
"enable_volume_gesture"
,
true
)
?
TOUCH_FLAG_AUDIO_VOLUME
:
0
)
+
(
mSettings
.
getBoolean
(
"enable_brightness_gesture"
,
true
)
?
2
:
0
);
+
(
mSettings
.
getBoolean
(
"enable_brightness_gesture"
,
true
)
?
TOUCH_FLAG_BRIGHTNESS
:
0
)
+
(
mSettings
.
getBoolean
(
"enable_double_tap_seek"
,
true
)
?
TOUCH_FLAG_SEEK
:
0
);
}
}
/* Services and miscellaneous */
/* Services and miscellaneous */
...
@@ -2140,12 +2145,12 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
...
@@ -2140,12 +2145,12 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mTouchY
=
event
.
getRawY
();
mTouchY
=
event
.
getRawY
();
mTouchX
=
event
.
getRawX
();
mTouchX
=
event
.
getRawX
();
// Volume (Up or Down - Right side)
// Volume (Up or Down - Right side)
if
(
mTouchControls
==
1
||
(
mTouchControls
==
3
&&
(
int
)
mTouchX
>
(
4
*
mScreen
.
widthPixels
/
7
f
)
)){
if
(
(
mTouchControls
&
TOUCH_FLAG_AUDIO_VOLUME
)
!=
0
&&
(
int
)
mTouchX
>
(
4
*
mScreen
.
widthPixels
/
7
f
)){
doVolumeTouch
(
y_changed
);
doVolumeTouch
(
y_changed
);
hideOverlay
(
true
);
hideOverlay
(
true
);
}
}
// Brightness (Up or Down - Left side)
// Brightness (Up or Down - Left side)
if
(
mTouchControls
==
2
||
(
mTouchControls
==
3
&&
(
int
)
mTouchX
<
(
3
*
mScreen
.
widthPixels
/
7
f
)
)){
if
(
(
mTouchControls
&
TOUCH_FLAG_BRIGHTNESS
)
!=
0
&&
(
int
)
mTouchX
<
(
3
*
mScreen
.
widthPixels
/
7
f
)){
doBrightnessTouch
(
y_changed
);
doBrightnessTouch
(
y_changed
);
hideOverlay
(
true
);
hideOverlay
(
true
);
}
}
...
@@ -3607,6 +3612,10 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
...
@@ -3607,6 +3612,10 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
if
(
mService
==
null
)
if
(
mService
==
null
)
return
false
;
return
false
;
if
(!
mIsLocked
)
{
if
(!
mIsLocked
)
{
if
((
mTouchControls
&
TOUCH_FLAG_SEEK
)
==
0
)
{
doPlayPause
();
return
true
;
}
float
x
=
e
.
getX
();
float
x
=
e
.
getX
();
if
(
x
<
range
/
4
f
)
if
(
x
<
range
/
4
f
)
seekDelta
(-
10000
);
seekDelta
(-
10000
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment