From 1baca589ab7e3f2574787dd3b03866a9bcafe9a3 Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 17 Mar 2021 10:55:09 +0100 Subject: [PATCH] fix focus on android 7 --- app/src/main/res/layout/activity_main.xml | 2 +- app/src/main/res/layout/mainform.xml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index a108a8f..f894f2d 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -6,7 +6,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginStart="30dp" - android:layout_marginTop="30dp" + android:layout_marginTop="10dp" android:layout_marginEnd="30dp" android:layout_marginBottom="30dp" android:orientation="vertical" diff --git a/app/src/main/res/layout/mainform.xml b/app/src/main/res/layout/mainform.xml index 030e75f..d5a4e00 100644 --- a/app/src/main/res/layout/mainform.xml +++ b/app/src/main/res/layout/mainform.xml @@ -4,7 +4,9 @@ android:id="@+id/mainForm" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="horizontal"> + android:orientation="horizontal" + android:descendantFocusability="beforeDescendants" + android:focusableInTouchMode="true">