jubincn

导航

2014年1月16日 #

Android 4 学习(21):对话框

摘要: 对话框创建Dialog的两种方式:1.使用Dialog类或其子类,包括DialogFragment2.在Activity中使用Dialog主题(theme)下面是使用Dialog类的一个例子:// Create the new Dialog.Dialog dialog = new Dialog(MyActivity.this); // Set the title. dialog.setTitle(“Dialog Title”); // Inflate the layout.dialog.setContentView(R.layout.dialog_view); // Update the Di 阅读全文

posted @ 2014-01-16 14:55 jubincn 阅读(275) 评论(0) 推荐(0) 编辑

Android 4 学习(20):ActionBar

摘要: 参考《ProAndroid4.0》ActionBar11.0之后,ActionBar在Activity中默认存在,可以在代码中设置其显示与否:ActionBar actionBar = getActionBar(); // Hide the Action Bar actionBar.hide(); // Show the Action Bar actionBar.show(); 也可以在Manifest中设置是否显示ActionBar: 创建一个不显示ActionBar的Theme: ActionBar的其他设置:ActionBar actionBar = getActionBar()... 阅读全文

posted @ 2014-01-16 14:45 jubincn 阅读(569) 评论(0) 推荐(0) 编辑