AlertDialog 使用string中的内容作为dialog的item
来源:互联网 发布:音乐后期软件 编辑:程序博客网 时间:2024/05/21 17:48
values目录下的string.XML文件
添加如下内容
<string-array name="menu_item">
<item>"item0"</item>
<item>"item1"</item>
<item>"item2"</item>
</string-array>
java代码
new AlertDialog.Builder(this).setTitle("测试").setItems(R.array.menu_item, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
}
}).show();
- AlertDialog 使用string中的内容作为dialog的item
- AlertDialog或者Dialog显示的内容异常
- Dialog的使用(一):用AlertDialog提示
- Dialog的使用(二):AlertDialog.setItems
- android开发-使用Dialog AlertDialog
- android开发-使用Dialog AlertDialog
- android开发-使用Dialog AlertDialog
- Android 例子: Dialog的使用--- AlertDialog功能演示一
- 使用PopoPWindow当做AlertDialog,控制Dialog的背景大小
- 自定义的AlertDialog获取软键盘和editext中的内容
- 使用ListView填充Dialog对话框里的item
- android中的Dialog的使用
- 使用Dialog AlertDialog ----模态异步
- 使用Fragment作为Item的ViewPager不更新问题.
- Activity作为dialog对话框的使用详细介绍
- 谨慎使用String作为HashMap的Key
- 谨慎使用String作为HashMap的Key
- 谨慎使用String作为HashMap的Key
- WaitForMultipleObjects
- Android控件之ListView探究二
- android 上下文菜单Context Menu
- java复习--关于反射的分析
- struts2标签
- AlertDialog 使用string中的内容作为dialog的item
- Dialog的使用:onCreateDialog showDialog
- 长按ExpandableListView中的选项
- dialog大全
- 好好陪父母
- 日期类加减及Java中日期类操作算法大全 (转)
- 临界区对象
- 互锁函数
- 仿Google分页的经典案例