ICS - 菜单项的文本切断?菜单项、文本、ICS

2023-09-04 05:28:40 作者:隐藏爱意

我使用的是标准的onCreateOptionsMenu,但是在我的Nexus瓦特/ ICS,当我点击在右上角的垂直菜单按钮,在下拉上下文菜单3/4关闭屏幕。基本上,我只看到在每个菜单项文本中的第3-4号。

I'm using the standard onCreateOptionsMenu, but on my Nexus w/ICS, when I tap the vertical menu button in the upper right corner, the dropdown context menu is 3/4 off the screen. Basically, I only see the first 3-4 letters in each menu items text.

任何想法?也许我没有得到那份备忘录!我不想建立一个动作条。我倒是觉得在默认情况下,这应该正常工作?!?

Any ideas? Maybe I didn't get that memo!! I dont want to setup an ActionBar. I'd think by default, this should work fine?!?

此外,它的pretty的多标准菜单code为< 3.0 SDK。

Again, its pretty much standard menu code for < 3.0 SDK.

@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();

if (!isPro()) {

    // add menu for ad-free Banner (launches Market)
    inflater.inflate(R.menu.menu_pro, menu);
}
inflater.inflate(R.menu.menu, menu);

return true;
}

使用标准菜单XML ...

Using standard menu XML...

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >

  <item
    android:id="@+id/help"
    android:icon="@drawable/ic_menu_help"
    android:title="@string/menu_help"/>

  <item
    android:id="@+id/email"
    android:icon="@drawable/email"
    android:title="@string/menu_email"/>

推荐答案

我真的不能说,为什么它切断顶部,但我说这对我的manifest.xml。

I cant really say why its cutting off on the top, but I added this to my manifest.xml.

android:theme="@android:style/Theme.Black" 

这基本上恢复了风格回2.X菜单,并将在底部右侧的垂直点。

This basically reverts the style back to 2.x menus and places the vertical "dots" on the bottom right.

其实,我在$默认兼容p $ PFER这一点,因为我仍然有我的图标菜单,而不是纯文本,只能下拉菜单。

I actually prefer this over the default compatibility because I still have my icon menus as opposed to plain text-only dropdown menus.

我还是想知道为什么我的菜单中的默认转换搞砸了但如果任何人都可以附和我会批出解决方案,那个人! (=

I'd still like to know why the "default" conversion of my menu is screwed up though if anyone can chime in I'll award the solution to that person! (=