English 中文(简体)
• 如何以习俗观点和标签创建安第斯山
原标题:How to create Android ActionBar with custom view and tabs

我想根据习俗(DISPLAY_SHOW_CUSTOM),创建有刺意味的行动Bar(NAVIGATION_MODE_TABS)。 它希望:

“entergraph

我只需要能够通过上行的纽托邦开展各项活动——正如我与巴拉行动正常做的那样——没有刺.的方式,并且能够在第二行改换表格。 如果我把《巴巴尔行动》定为一种有刺bed的姿态,习俗观念就消失了,那么,表扬的方式和习俗似乎相互排斥...... 是否可能?

如果不在巴拉行动,就有更多的可能的方法。 通常,我会与纽芬兰人一道做布局,将它列入“贱民”(目前已经折旧)和“所有人”。 但我认为这不是最佳解决办法,因此任何帮助或建议都受到赞赏。

提前感谢。

EDIT:经过一些研究,我发现它发挥了作用,这在我的4英寸屏幕上就没有显示。 然而,它仍未像我所期望的那样发挥作用。 在较广的屏幕上,在表格右侧显示一种习俗观念——它ok,但在4英寸的电话屏幕上却根本不展示。

我认为,最好的解决办法是利用BarSherlock图书馆(我不喜欢使用假装的特征,我的用人还必须在预制成型装置和碎块上工作——一个是“Bar”最高行动图书馆,另一个是“被制成”。

最佳回答

必须将上行的县作为选项。 Menu项目:

@Override
public boolean onCreateOptionsMenu(Menu menu)
{
    for (int i = 0; i < menuItems; i++)
    {
        if (i == 0)
        {
            menu.add(R.string.home).setIcon(R.drawable.button_home).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
            menu.getItem(0).setOnMenuItemClickListener(this);

        }
    }

    return super.onCreateOptionsMenu(menu);
}

当我提出要求时,《巴拉行动》的理念略有不同。 http://developer.android.com/guide/topics/ui/actionbar.html 简编指南:

当你想在一项活动中提供导航表格时,使用行动条码是一大选择(而不是使用TabWidget),因为该系统调整了不同屏幕尺寸的行动条码——在屏幕足够广泛时将其放在主要行动条码上,或者在屏幕过于狭窄时,单条条条条条条条条条条条条条条条条(称为“封闭行动条”。

问题回答

暂无回答




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签