fix: welcome activity does not permit auto rotation

This commit is contained in:
Bnyro 2024-05-05 13:58:34 +02:00
parent 8b43ebc7b4
commit 3dfd87b8e2
3 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,7 @@
package com.github.libretube.ui.activities
import android.content.Intent
import android.content.pm.ActivityInfo
import android.os.Bundle
import android.widget.Toast
import androidx.activity.result.contract.ActivityResultContracts
@ -80,4 +81,8 @@ class WelcomeActivity : BaseActivity() {
startActivity(mainActivityIntent)
finish()
}
override fun requestOrientationChange() {
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER
}
}

View File

@ -59,7 +59,7 @@ open class BaseActivity : AppCompatActivity() {
/**
* Rotate the screen according to the app orientation preference
*/
fun requestOrientationChange() {
open fun requestOrientationChange() {
requestedOrientation = screenOrientationPref
}
}

View File

@ -70,8 +70,9 @@
android:id="@+id/instances_recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:fadeScrollbars="false"
android:paddingBottom="100dp"
android:paddingBottom="70dp"
android:scrollbars="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />