Android's own alertdialog,progressdialog,datepickerdialog,timepickerdialog can be used for simple dialog box display. You can use some custom dialog boxes when you still have these dialog boxes that don't meet your application's needs. There are several ways to implement a custom dialog box. One is the use of activity as a dialog, can be set by the activity Display dialog style, so that the activity in appearance and dialog consistent: shown in front of other activity and translucent.
<activity android:name= "mydialogactivity" android:theme= "@android: Style/theme.dialog " ></ Activity>
This example uses the other two methods to use the custom dialog box, which will use this dialog box to most graphically transform (Transform) options:
Primitive:rectange, Ellipse,text pen:thin,thick,dashed brush:solid, Gradient,texture transform:identity, Rotate, Scal E, Shear Rendering:stroke, fill, Stoke and fill
First, under Res/layout, create a new Transformoption.xml as a custom dialog box layout:
<?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= "Fill_parent"
>
<scrollview
Android:layout_width= "Fill_parent"
android:layout_height= "Fill_parent" >
<linearlayout
Android:layout_width= "Fill_parent"
android:layout_height= "Fill_parent"
android:orientation= "Vertical"
>
<textview
android:text= "Primitive"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</TextView>
<radiogroup
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
<radiobutton
android:text= "Rectangle"
Android:id= "@+id/radiorectangle"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
<radiobutton
android:text= "Ellipse"
Android:id= "@+id/radioellipse"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
<radiobutton
android:text= "Text"
Android:id= "@+id/radiotext"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
</RadioGroup>
<textview
android:text= "Pen"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</TextView>
<radiogroup
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
<radiobutton
android:text= "Thin"
Android:id= "@+id/radiothin"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
<radiobutton
android:text= "thick"
Android:id= "@+id/radiothick"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
<radiobutton
android:text= "Dashed"
Android:id= "@+id/radiodashed"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
</RadioGroup>
<textview
android:text= "Brush"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</TextView>
<radiogroup
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
<radiobutton
android:text= "Solid"
Android:id= "@+id/radiosolid"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
<radiobutton
android:text= "Gradient"
Android:id= "@+id/radiogradient"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
<radiobutton
android:text= "Texture"
Android:id= "@+id/radiotexture"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
</RadioGroup>
<textview
android:text= "Transform"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</TextView>
<radiogroup
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
<radiobutton
android:text= "Identity"
Android:id= "@+id/radioidentity"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
<radiobutton
android:text= "Rotate"
Android:id= "@+id/radiorotate"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
<radiobutton
android:text= "Scale"
Android:id= "@+id/radioscale"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
<radiobutton
android:text= "Shear"
Android:id= "@+id/radioshear"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
</RadioGroup>
<textview
android:text= "Rendering"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</TextView>
<radiogroup
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
<radiobutton
android:text= "Stroke"
Android:id= "@+id/radiostroke"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
<radiobutton
android:text= "Fill"
Android:id= "@+id/radiofill"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
<radiobutton
Android:text= "Stroke and Fill"
Android:id= "@+id/radiostrokefill"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content" >
</RadioButton>
</RadioGroup>
</LinearLayout>
</ScrollView>
</LinearLayout>