mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-28 20:57:42 +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:layout_height="wrap_content"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="12dp"
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/container"
|
android:id="@+id/container"
|
||||||
|
android:descendantFocusability="afterDescendants"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
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"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:descendantFocusability="afterDescendants"
|
||||||
|
android:focusable="false"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="org.kde.kdeconnect.UserInterface.DeviceFragment">
|
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
|
<androidx.core.widget.NestedScrollView
|
||||||
android:id="@+id/device_view"
|
android:id="@+id/device_view"
|
||||||
|
android:descendantFocusability="afterDescendants"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="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
|
<FrameLayout
|
||||||
android:id="@+id/container"
|
android:id="@+id/container"
|
||||||
|
android:descendantFocusability="afterDescendants"
|
||||||
|
android:focusable="false"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
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:layout_height="match_parent"
|
||||||
android:addStatesFromChildren="true"
|
android:addStatesFromChildren="true"
|
||||||
android:divider="@null"
|
android:divider="@null"
|
||||||
|
android:descendantFocusability="afterDescendants"
|
||||||
android:dividerHeight="12dp"
|
android:dividerHeight="12dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:listitem="@layout/list_card_entry"
|
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_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="12dp"
|
android:layout_margin="12dp"
|
||||||
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
card_view:cardUseCompatPadding="true">
|
card_view:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<LinearLayout
|
<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:layout_height="wrap_content"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
android:paddingBottom="12dp"
|
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:paddingRight="16dp"
|
||||||
android:text="@string/pairing_description"
|
android:text="@string/pairing_description"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
@ -30,6 +30,8 @@ public class SectionItem implements ListAdapter.Item {
|
|||||||
//Make it not selectable
|
//Make it not selectable
|
||||||
binding.getRoot().setOnClickListener(null);
|
binding.getRoot().setOnClickListener(null);
|
||||||
binding.getRoot().setOnLongClickListener(null);
|
binding.getRoot().setOnLongClickListener(null);
|
||||||
|
binding.getRoot().setFocusable(false);
|
||||||
|
binding.getRoot().setClickable(false);
|
||||||
|
|
||||||
binding.listItemCategoryText.setText(title);
|
binding.listItemCategoryText.setText(title);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user