1
0
Fork 0

explicitly disabled the focus of the Status Bar and the Suggestion Bar to prevent unwanted highlighting on some devices

This commit is contained in:
sspanak 2024-11-26 18:47:37 +02:00 committed by Dimo Karaivanov
parent 399f7a414c
commit 908796c4f3
2 changed files with 16 additions and 1 deletions

View file

@ -12,12 +12,18 @@
<FrameLayout <FrameLayout
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="@dimen/candidate_height"> android:layout_height="@dimen/candidate_height"
android:defaultFocusHighlightEnabled="false"
android:focusable="false"
android:focusableInTouchMode="false">
<TextView <TextView
android:id="@+id/status_bar" android:id="@+id/status_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:defaultFocusHighlightEnabled="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center" android:gravity="center"
android:textStyle="italic" android:textStyle="italic"
tools:text="@tools:sample/lorem" /> tools:text="@tools:sample/lorem" />
@ -26,6 +32,9 @@
android:id="@+id/suggestions_bar" android:id="@+id/suggestions_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:defaultFocusHighlightEnabled="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:scrollbars="none" /> android:scrollbars="none" />

View file

@ -2,12 +2,18 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:defaultFocusHighlightEnabled="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:id="@+id/suggestion_list_item" android:id="@+id/suggestion_list_item"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:defaultFocusHighlightEnabled="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center" android:gravity="center"
android:paddingHorizontal="@dimen/candidate_padding_horizontal" android:paddingHorizontal="@dimen/candidate_padding_horizontal"
android:textSize="@dimen/candidate_font_size" /> android:textSize="@dimen/candidate_font_size" />