mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-21 17:37:39 +00:00
Fix keyboard/d-pad navigation
Allows navigating the app using the arrow keys on a keyboard or the D-pad on a TV remote, up until the plugin list (I haven't checked specific plugins).
This commit is contained in:
parent
4e9dece3b2
commit
1d822e1610
@ -5,6 +5,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:drawablePadding="8dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="12dp"
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:descendantFocusability="afterDescendants"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
||||
|
@ -9,6 +9,8 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:descendantFocusability="afterDescendants"
|
||||
android:focusable="false"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="org.kde.kdeconnect.UserInterface.DeviceFragment">
|
||||
|
||||
@ -26,6 +28,7 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/device_view"
|
||||
android:descendantFocusability="afterDescendants"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
@ -24,6 +24,8 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:descendantFocusability="afterDescendants"
|
||||
android:focusable="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
|
@ -19,6 +19,7 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted
|
||||
android:layout_height="match_parent"
|
||||
android:addStatesFromChildren="true"
|
||||
android:divider="@null"
|
||||
android:descendantFocusability="afterDescendants"
|
||||
android:dividerHeight="12dp"
|
||||
android:orientation="vertical"
|
||||
tools:listitem="@layout/list_card_entry"
|
||||
|
@ -26,6 +26,8 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
card_view:cardUseCompatPadding="true">
|
||||
|
||||
<LinearLayout
|
||||
|
@ -12,6 +12,7 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:drawablePadding="8dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="12dp"
|
||||
|
@ -16,6 +16,7 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted
|
||||
android:paddingRight="16dp"
|
||||
android:text="@string/pairing_description"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:background="@android:color/transparent"
|
||||
>
|
||||
|
||||
|
@ -30,6 +30,8 @@ public class SectionItem implements ListAdapter.Item {
|
||||
//Make it not selectable
|
||||
binding.getRoot().setOnClickListener(null);
|
||||
binding.getRoot().setOnLongClickListener(null);
|
||||
binding.getRoot().setFocusable(false);
|
||||
binding.getRoot().setClickable(false);
|
||||
|
||||
binding.listItemCategoryText.setText(title);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user