mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Merge pull request #2049 from Bnyro/master
hide the open with button by default
This commit is contained in:
commit
14817245b2
@ -84,6 +84,7 @@ object PreferenceKeys {
|
|||||||
const val USE_HLS_OVER_DASH = "use_hls"
|
const val USE_HLS_OVER_DASH = "use_hls"
|
||||||
const val QUEUE_AUTO_INSERT_RELATED = "queue_insert_related_videos"
|
const val QUEUE_AUTO_INSERT_RELATED = "queue_insert_related_videos"
|
||||||
const val PLAYER_SWIPE_CONTROLS = "player_swipe_controls"
|
const val PLAYER_SWIPE_CONTROLS = "player_swipe_controls"
|
||||||
|
const val SHOW_OPEN_WITH = "show_open_with"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Background mode
|
* Background mode
|
||||||
|
@ -403,6 +403,11 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
|
|||||||
LinearLayoutManager.HORIZONTAL,
|
LinearLayoutManager.HORIZONTAL,
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (!PreferenceHelper.getBoolean(PreferenceKeys.SHOW_OPEN_WITH, false)) {
|
||||||
|
binding.relPlayerOpen.visibility = View.GONE
|
||||||
|
binding.optionsLL.weightSum = 4f
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setFullscreen() {
|
private fun setFullscreen() {
|
||||||
|
@ -140,6 +140,7 @@
|
|||||||
app:cardCornerRadius="27dp">
|
app:cardCornerRadius="27dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/optionsLL"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -395,6 +395,8 @@
|
|||||||
<string name="swipe_controls">Swipe controls</string>
|
<string name="swipe_controls">Swipe controls</string>
|
||||||
<string name="swipe_controls_summary">Use swipe gesture to adjust the brightness and volume.</string>
|
<string name="swipe_controls_summary">Use swipe gesture to adjust the brightness and volume.</string>
|
||||||
<string name="defaults">Defaults</string>
|
<string name="defaults">Defaults</string>
|
||||||
|
<string name="show_open_with">Open With</string>
|
||||||
|
<string name="show_open_with_summary">Show a button to open the video with a 3rd party app at the player.</string>
|
||||||
|
|
||||||
<!-- Notification channel strings -->
|
<!-- Notification channel strings -->
|
||||||
<string name="download_channel_name">Download Service</string>
|
<string name="download_channel_name">Download Service</string>
|
||||||
|
@ -134,6 +134,13 @@
|
|||||||
app:key="pause_screen_off"
|
app:key="pause_screen_off"
|
||||||
app:title="@string/pauseOnScreenOff" />
|
app:title="@string/pauseOnScreenOff" />
|
||||||
|
|
||||||
|
<SwitchPreferenceCompat
|
||||||
|
android:icon="@drawable/ic_open"
|
||||||
|
android:summary="@string/show_open_with_summary"
|
||||||
|
app:defaultValue="false"
|
||||||
|
app:key="show_open_with"
|
||||||
|
app:title="@string/show_open_with" />
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
Loading…
Reference in New Issue
Block a user