Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6bddd877 authored by Adam Powell's avatar Adam Powell
Browse files

Fix bug 4084399 - with usb keyboard, actionbar menuitems with

icon+text take dpad focus twice in row

Fix action menu item layout focusability so that only the full item is
focusable. Fix up listeners appropriately.

Change-Id: I127c36404894869a08c5f4472491e3e596563c5c
parent 3224fac1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ public class ActionMenuItemView extends LinearLayout
        mTextButton = (Button) findViewById(com.android.internal.R.id.textButton);
        mImageButton.setOnClickListener(this);
        mTextButton.setOnClickListener(this);
        setOnClickListener(this);
    }

    public MenuItemImpl getItemData() {
+6 −3
Original line number Diff line number Diff line
@@ -24,7 +24,8 @@
    android:paddingLeft="12dip"
    android:paddingRight="12dip"
    android:minWidth="64dip"
    android:minHeight="?attr/actionBarSize">
    android:minHeight="?attr/actionBarSize"
    android:focusable="true">
    <ImageButton android:id="@+id/imageButton"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
@@ -34,7 +35,8 @@
                 android:paddingRight="4dip"
                 android:minHeight="56dip"
                 android:scaleType="center"
                 android:background="@null" />
                 android:background="@null"
                 android:focusable="false" />
    <Button android:id="@+id/textButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
@@ -45,5 +47,6 @@
            android:textColor="?attr/actionMenuTextColor"
            android:background="@null"
            android:paddingLeft="4dip"
            android:paddingRight="4dip" />
            android:paddingRight="4dip"
            android:focusable="false" />
</com.android.internal.view.menu.ActionMenuItemView>