如何显示弹出菜单下面的确切ActionBar的? [英] How to show menu popup exact below actionbar?

查看:226
本文介绍了如何显示弹出菜单下面的确切ActionBar的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在动作条工作弹出菜单上。但我坚持要准确显示以下动作条(切对切)。我是把两个快照。的

I am working on popup-menu in actionbar. But I am stuck to display exact below of actionbar(cut-to-cut).I am putting two snapshot.

我的问题截屏:

在这里输入的形象描述

我想下面的动作条的确切弹出菜单下面的截图

I want exact popup menu below of actionbar as below screenshot

修正截图:

在这里输入的形象描述

我的code片断:

<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
<item android:id="@+id/action_filter"
    android:icon="@drawable/ic_filter_white_18dp"
    android:title="@string/action_filter"
    app:showAsAction="ifRoom" />
<item android:id="@+id/action_label"
    android:icon="@drawable/ic_add_circle_outline_white_18dp"
    android:title="@string/action_label"
    app:showAsAction="ifRoom" />
<item android:id="@+id/action_settings"
    android:title="@string/action_settings"
    app:showAsAction="never" />

推荐答案

设置为Android清单主题,以

Set the theme at android manifest to

android:theme="@android:style/Theme.Holo.Light"

这篇关于如何显示弹出菜单下面的确切ActionBar的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆