mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Use requestFocus() for more device support
This commit is contained in:
parent
3a0ae2e475
commit
39bdcb941f
6 changed files with 11 additions and 16 deletions
|
@ -1,9 +1,7 @@
|
||||||
package com.lagradost.cloudstream3.ui.account
|
package com.lagradost.cloudstream3.ui.account
|
||||||
|
|
||||||
import android.os.Build
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.annotation.RequiresApi
|
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.lagradost.cloudstream3.databinding.AccountListItemBinding
|
import com.lagradost.cloudstream3.databinding.AccountListItemBinding
|
||||||
|
@ -27,9 +25,8 @@ class AccountAdapter(
|
||||||
binding.lockIcon.isVisible = account.lockPin != null
|
binding.lockIcon.isVisible = account.lockPin != null
|
||||||
binding.outline.isVisible = isLastUsedAccount
|
binding.outline.isVisible = isLastUsedAccount
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
if (isTvSettings() && isLastUsedAccount) {
|
||||||
if (isTvSettings()) {
|
binding.root.requestFocus()
|
||||||
binding.root.isFocusedByDefault = isLastUsedAccount
|
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.root.setOnClickListener {
|
binding.root.setOnClickListener {
|
||||||
|
|
|
@ -52,4 +52,5 @@
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:background="?attr/black"
|
android:background="?attr/black"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -27,4 +26,3 @@
|
||||||
android:paddingRight="16dp" />
|
android:paddingRight="16dp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:background="?attr/black"
|
android:background="?attr/black"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue