Loading core/java/com/android/internal/view/menu/ListMenuItemView.java +18 −3 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ public class ListMenuItemView extends LinearLayout private TextView mShortcutView; private ImageView mSubMenuArrowView; private ImageView mGroupDivider; private LinearLayout mContent; private Drawable mBackground; private int mTextAppearance; Loading Loading @@ -114,6 +115,8 @@ public class ListMenuItemView extends LinearLayout mSubMenuArrowView.setImageDrawable(mSubMenuArrow); } mGroupDivider = findViewById(com.android.internal.R.id.group_divider); mContent = findViewById(com.android.internal.R.id.content); } public void initialize(MenuItemImpl itemData, int menuType) { Loading @@ -131,6 +134,18 @@ public class ListMenuItemView extends LinearLayout setContentDescription(itemData.getContentDescription()); } private void addContentView(View v) { addContentView(v, -1); } private void addContentView(View v, int index) { if (mContent != null) { mContent.addView(v, index); } else { addView(v, index); } } public void setForceShowIcon(boolean forceShow) { mPreserveIconSpacing = mForceShowIcon = forceShow; } Loading Loading @@ -270,7 +285,7 @@ public class ListMenuItemView extends LinearLayout LayoutInflater inflater = getInflater(); mIconView = (ImageView) inflater.inflate(com.android.internal.R.layout.list_menu_item_icon, this, false); addView(mIconView, 0); addContentView(mIconView, 0); } private void insertRadioButton() { Loading @@ -278,7 +293,7 @@ public class ListMenuItemView extends LinearLayout mRadioButton = (RadioButton) inflater.inflate(com.android.internal.R.layout.list_menu_item_radio, this, false); addView(mRadioButton); addContentView(mRadioButton); } private void insertCheckBox() { Loading @@ -286,7 +301,7 @@ public class ListMenuItemView extends LinearLayout mCheckBox = (CheckBox) inflater.inflate(com.android.internal.R.layout.list_menu_item_checkbox, this, false); addView(mCheckBox); addContentView(mCheckBox); } public boolean prefersCondensedTitle() { Loading core/res/res/layout/popup_menu_item_layout.xml +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ <!-- The title and summary have some gap between them, and this 'group' should be centered vertically. --> <LinearLayout android:id="@+id/content" android:layout_width="wrap_content" android:layout_height="?attr/dropdownListPreferredItemHeight" android:paddingEnd="16dip" Loading Loading
core/java/com/android/internal/view/menu/ListMenuItemView.java +18 −3 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ public class ListMenuItemView extends LinearLayout private TextView mShortcutView; private ImageView mSubMenuArrowView; private ImageView mGroupDivider; private LinearLayout mContent; private Drawable mBackground; private int mTextAppearance; Loading Loading @@ -114,6 +115,8 @@ public class ListMenuItemView extends LinearLayout mSubMenuArrowView.setImageDrawable(mSubMenuArrow); } mGroupDivider = findViewById(com.android.internal.R.id.group_divider); mContent = findViewById(com.android.internal.R.id.content); } public void initialize(MenuItemImpl itemData, int menuType) { Loading @@ -131,6 +134,18 @@ public class ListMenuItemView extends LinearLayout setContentDescription(itemData.getContentDescription()); } private void addContentView(View v) { addContentView(v, -1); } private void addContentView(View v, int index) { if (mContent != null) { mContent.addView(v, index); } else { addView(v, index); } } public void setForceShowIcon(boolean forceShow) { mPreserveIconSpacing = mForceShowIcon = forceShow; } Loading Loading @@ -270,7 +285,7 @@ public class ListMenuItemView extends LinearLayout LayoutInflater inflater = getInflater(); mIconView = (ImageView) inflater.inflate(com.android.internal.R.layout.list_menu_item_icon, this, false); addView(mIconView, 0); addContentView(mIconView, 0); } private void insertRadioButton() { Loading @@ -278,7 +293,7 @@ public class ListMenuItemView extends LinearLayout mRadioButton = (RadioButton) inflater.inflate(com.android.internal.R.layout.list_menu_item_radio, this, false); addView(mRadioButton); addContentView(mRadioButton); } private void insertCheckBox() { Loading @@ -286,7 +301,7 @@ public class ListMenuItemView extends LinearLayout mCheckBox = (CheckBox) inflater.inflate(com.android.internal.R.layout.list_menu_item_checkbox, this, false); addView(mCheckBox); addContentView(mCheckBox); } public boolean prefersCondensedTitle() { Loading
core/res/res/layout/popup_menu_item_layout.xml +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ <!-- The title and summary have some gap between them, and this 'group' should be centered vertically. --> <LinearLayout android:id="@+id/content" android:layout_width="wrap_content" android:layout_height="?attr/dropdownListPreferredItemHeight" android:paddingEnd="16dip" Loading