以创建文件为例
一、资源里layout文件夹里的布局文件create_dialog.xml如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<!-- 二选一 -->
<RadioGroup
android:id="@+id/radiogroup_create"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<!-- 创建文件选项 -->
<RadioButton
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:text="@string/create_file"
android:id="@+id/create_file" />
<!-- 创建文件夹选项