如何像铬一样拆分菜单 [英] How to Split the menu like chrome

查看:109
本文介绍了如何像铬一样拆分菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何拆分如图所示的chrome浏览器之类的菜单:

How to split a menu like chrome browser as shown in the image:

这是我的实际代码

<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="materialtest.vivz.slidenerd.activities.MainActivity">

    <item
        android:id="@+id/action_settings"
        android:orderInCategory="100"
        android:title="@string/action_settings"
        app:showAsAction="never" />

</menu>

推荐答案

您可以实现dialogFragment,并且可以在屏幕上找到所需的位置.

You can implement dialogFragment and you can locate on the screen where you want.

这里是一个示例:

http://www.androidbegin.com/tutorial/android-dialogfragment-教程/

您可以更改对话框的位置.您可以在这里找到它的工作方式:

You can change the position of the dialog. You can find it out how it works here :

更改对话框在屏幕android上的位置

这篇关于如何像铬一样拆分菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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