Android – creating options menu android bottom of page on android


Is it possible to create on option menu but have it at the bottom of the page. I'm working with <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />. I know that by default it is position at the top, but im assuming it can be bought to the bottom. I just dont know how .
here is my code


<menu xmlns:android="">
    <item android:id="@+id/scan"
    <item android:id="@+id/discoverable"

public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(, menu);
    return true;

public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        // Launch the DeviceListActivity to see devices and do scan
        Intent serverIntent = new Intent(this, DeviceListActivity.class);
        startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE);
        return true;

        // Ensure this device is discoverable by others
        return true;

    return false;

Any help would be great.

Best Solution

Seeing that you target sdk 17, you can use the SplitBar, it is an option available on the default ActionBar:

You need to declare it in every activity where it is needed in your manifest file, for example:

        android:uiOptions="splitActionBarWhenNarrow" />

Then in your onCreate function, you can also call a custom layout if you still need to display additional buttons at the top of the screen:

ActionBar actionBar = getActionBar();
    actionBar.setCustomView(R.layout.action_bar_custom); //load menu

By default, the icons displayed normally at the top will be displayed at the bottom, but you can still add custom action buttons using a custom layout such as the one in this example. The setDisplayOptions function is described here.

EDIT: the menu will be displayed at the bottom only on narrow screens, on bigger devices or in landscape mode, the default action bar at the top will be displayed.