2
0
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:
Albert Vaca Cintora 2023-08-21 16:11:29 +02:00
parent 4e9dece3b2
commit 1d822e1610
9 changed files with 14 additions and 0 deletions

View File

@ -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"

View File

@ -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"/>

View File

@ -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">

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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"
>

View File

@ -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);