mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Merge pull request #3838 from SajalRG/force-landscap-on-tv
Enable auto rotate by default in TV
This commit is contained in:
commit
4b7c3965d7
@ -54,7 +54,12 @@ class MainActivity : BaseActivity() {
|
||||
lateinit var navController: NavController
|
||||
private var startFragmentId = R.id.homeFragment
|
||||
|
||||
val autoRotationEnabled = PreferenceHelper.getBoolean(PreferenceKeys.AUTO_ROTATION, false)
|
||||
val autoRotationEnabled: Boolean by lazy {
|
||||
PreferenceHelper.getBoolean(
|
||||
PreferenceKeys.AUTO_ROTATION,
|
||||
resources.getBoolean(R.bool.config_default_auto_rotation_pref)
|
||||
)
|
||||
}
|
||||
|
||||
lateinit var searchView: SearchView
|
||||
private lateinit var searchItem: MenuItem
|
||||
|
3
app/src/main/res/values-television/config.xml
Normal file
3
app/src/main/res/values-television/config.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<bool name="config_default_auto_rotation_pref">true</bool>
|
||||
</resources>
|
3
app/src/main/res/values/config.xml
Normal file
3
app/src/main/res/values/config.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<bool name="config_default_auto_rotation_pref">false</bool>
|
||||
</resources>
|
@ -31,7 +31,7 @@
|
||||
app:key="audio_only_mode" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:defaultValue="@bool/config_default_auto_rotation_pref"
|
||||
android:icon="@drawable/ic_screen_rotation"
|
||||
app:key="auto_rotation"
|
||||
app:title="@string/auto_rotation" />
|
||||
|
Loading…
Reference in New Issue
Block a user