On Android Honeycomb how do I add option menu to t

2019-07-29 00:32发布

I'm On Honeycomb (3.1) and my first problem is that I don't know what is the name of the bar at the bottom of the OS (appears in every application). I've seen some apps add options to this bottom bar (it has by default the back button the home button and the show active programs button, besides the watch, battery indicator and signal connection strength). When a certain program uses options it sometimes adds them to this bottom bar (it is usually seen as a grid-like icon next to the show active programs buttons, which you can click and a menu pops up.

I've described it as best as I can, but My question is simple: how can I create a menu like this on in my app?

Thanks for any help!

EDIT:

Ok, I've just read it's a compatibility feature. And it's not supposed to be there in an Android App.

I feel stupid...

1条回答
【Aperson】
2楼-- · 2019-07-29 01:18

I'm On Honeycomb (3.1) and my first problem is that I don't know what is the name of the bar at the bottom of the OS (appears in every application).

That is the "system bar".

I've seen some apps add options to this bottom bar

This happens automatically for applications that set up an options menu using onCreateOptionsMenu(). However, once the application switches to the Honeycomb look-and-feel (e.g., via android:targetSdkVersion="11"), the options menu moves to the action bar.

how can I create a menu like this on in my app?

Long-term, you do not want to do this, because it means that you will not have the action bar and will not look like you belong on Honeycomb, Ice Cream Sandwich, etc.

Short-term, simply do not have android:targetSdkVersion="11", and implement an options menu as normal.

查看更多
登录 后发表回答