简体   繁体   English

Android-简单应用的主菜单

[英]Android - Main menu for simple app

I'm making a simple android app, and I'm trying to work out the best way to make the main menu. 我正在制作一个简单的Android应用程序,并且正在尝试找出制作主菜单的最佳方法。 The users of this app are not likely to be that sophisticated, so I want to make it as simple as possible. 此应用程序的用户不太可能那么复杂,因此我想使其尽可能简单。

So I want the first screen they see when the app opens to be this menu - they click on what they want, and it takes them to that part of the app (Not pressing a "Menu" button to bring it across from the left, which is common nowdays). 因此,我希望打开应用程序时他们看到的第一个屏幕成为此菜单-他们单击所需的内容,然后将其带到应用程序的该部分(不要按“菜单”按钮将其从左侧移开,如今很常见)。

So, I want the menu to look a bit like this: http://cloud.addictivetips.com/wp-content/uploads/2012/10/AppZapp-Android-Menu.jpg , minus the search box, and the strip down the right hand side. 因此,我希望菜单看起来像这样: http : //cloud.addictivetips.com/wp-content/uploads/2012/10/AppZapp-Android-Menu.jpg ,减去搜索框,然后将其剥离右边。 (also this looks like it is one of those menus that slide out from the left, which I dont want) (看起来也好像是从左侧滑出的那些菜单之一,我不希望这样)

I have had a look into menus ( https://developer.android.com/guide/topics/ui/menus.html#options-menu ), but it seems it is more used for contextual stuff, or letting the user select an option), then a navigation menu. 我看过菜单( https://developer.android.com/guide/topics/ui/menus.html#options-menu ),但似乎它更多地用于上下文内容,或者让用户选择选项),然后是导航菜单。

So - what is the best way to do this? 那么-这样做的最佳方法是什么? Do I just create a list and put a button in each item? 我是否只是创建一个列表并在每个项目中放置一个按钮?

Based on the your requirement , Use Navigation drawer see the below link. 根据您的要求,使用导航抽屉,请参见以下链接。

Navigation drawer tutorial NavigationDrawerSample 导航抽屉教程 NavigationDrawerSample

After used navigation drawer, you need to add search view on navigation header.For more info see the link SearchView tutorial 使用完导航抽屉后,您需要在导航标题上添加搜索视图。有关更多信息,请参见链接SearchView教程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM