下拉菜单选择? [英] dropdown menu selection?

查看:85
本文介绍了下拉菜单选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,
我会尽力解释我的需要,所以希望您能理解我的意思:)

好吧,我正在为Android开发一个应用程序,我想要的第一页是一个下拉菜单,上面带有一些名称,分别位于不同的饮用游戏"上,例如首先是轮盘赌,然后是另一个,依此类推. br/> 但是我的问题是我从下拉菜单中选择它后不知道如何启动它,然后按下开始"按钮时,它将启动选定的游戏.

到目前为止的图片如下:

第一个对话框

希望您能理解并能够提供帮助:)

Hey,
I will try to explain what i need, so i hope you understand me :)

Well, i''m developing an app for android, and the first page i want is a drop down menu, with some names, on different "drinking-games" like first is shot roulette, and then another, and so on.
But my problem is i dont know how i get it to start the "game" after selecting it from the dropdown menu, and then when the "start" button is pressed, it will start the selected game.

Here''s the graphics so far:

first dialog

Hope you understand, and are able to help :)

推荐答案

How about a OnMenuItemClickListener[^]?

That one reacts to the Menu Event and gets the MenuItem, the Event was fired on. Should be simple to react on that.


我需要该放置菜单具有不同的游戏名称,例如,当您打开该放置菜单时,它会显示game1并进一步向下显示游戏2,依此类推.当您选择游戏2时,它会与game2打开一个新窗口.
然后,我是否需要使用game2创建一个新的.java文件?
i need the dropmenu to have different names of games, like when you open the dropmenu it says game1 and further down game 2, and so on. When you fx select game 2, then it open a new window with game2.
Do i then need to create a new .java file, with game2?


这篇关于下拉菜单选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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