diff options
author | Adam Powell <adamp@google.com> | 2014-07-11 13:06:40 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2014-07-11 13:27:16 -0700 |
commit | ed68773e82626148d9e4c8da6b2288b1f2f926c2 (patch) | |
tree | 963a16d1d9a35dc58c90290f7bb928f894a253fa | |
parent | e7f601c3900814e890cb687023d2a901f0e725a0 (diff) | |
download | frameworks_base-ed68773e82626148d9e4c8da6b2288b1f2f926c2.zip frameworks_base-ed68773e82626148d9e4c8da6b2288b1f2f926c2.tar.gz frameworks_base-ed68773e82626148d9e4c8da6b2288b1f2f926c2.tar.bz2 |
Block focus with a touchscreen for ActionBars and Toolbars
Focus in the presence of a keyboard follows content, not navigational
elements.
Change-Id: I08d0f2fcfe0d4c58418466545b7b57d1345bd07f
-rw-r--r-- | core/res/res/layout/screen_action_bar.xml | 2 | ||||
-rw-r--r-- | core/res/res/layout/screen_toolbar.xml | 1 | ||||
-rw-r--r-- | core/res/res/values/styles.xml | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/core/res/res/layout/screen_action_bar.xml b/core/res/res/layout/screen_action_bar.xml index 5acb588..b3a3478 100644 --- a/core/res/res/layout/screen_action_bar.xml +++ b/core/res/res/layout/screen_action_bar.xml @@ -35,6 +35,7 @@ This is an optimized layout for a screen with the Action Bar enabled. android:layout_alignParentTop="true" style="?attr/actionBarStyle" android:transitionName="android:action_bar" + android:touchscreenBlocksFocus="true" android:gravity="top"> <com.android.internal.widget.ActionBarView android:id="@+id/action_bar" @@ -53,5 +54,6 @@ This is an optimized layout for a screen with the Action Bar enabled. android:layout_height="wrap_content" style="?attr/actionBarSplitStyle" android:visibility="gone" + android:touchscreenBlocksFocus="true" android:gravity="center"/> </com.android.internal.widget.ActionBarOverlayLayout> diff --git a/core/res/res/layout/screen_toolbar.xml b/core/res/res/layout/screen_toolbar.xml index 56815f8..039e89f 100644 --- a/core/res/res/layout/screen_toolbar.xml +++ b/core/res/res/layout/screen_toolbar.xml @@ -35,6 +35,7 @@ This is an optimized layout for a screen with a toolbar enabled. android:layout_alignParentTop="true" style="?attr/actionBarStyle" android:transitionName="android:action_bar" + android:touchscreenBlocksFocus="true" android:gravity="top"> <Toolbar android:id="@+id/action_bar" diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml index 7f216e5..9e25913 100644 --- a/core/res/res/values/styles.xml +++ b/core/res/res/values/styles.xml @@ -1206,6 +1206,7 @@ please see styles_device_defaults.xml. <item name="navigationButtonStyle">@style/Widget.Toolbar.Button.Navigation</item> <item name="collapseIcon">?attr/homeAsUpIndicator</item> <item name="contentInsetStart">16dp</item> + <item name="touchscreenBlocksFocus">true</item> </style> <style name="Widget.Toolbar.Button.Navigation" parent="Widget"> |