have been using the iphone so much like the various controls of iOS, previously done ios7 sliding buttons http://www.eoeandroid.com/thread-331542-1-1.html
This time again imitate iOS7 two kinds of dialog box, QQ also do and ios7 the same, bottom menu list and Alertdialog, the effect is as follows:
1.AlertDialog, using the same method and Android comes with the same
- New Alertdialog (mainactivity.this). Builder ()
- . Settitle ("title")
- . setmsg ("text content")
- . Setcancelable (False)
- . Setpositivebutton ("Confirm", new Onclicklistener () {
- @Override
- public void OnClick (View v) {
- //
- }
- }). Setnegativebutton ("Cancel", new Onclicklistener () {
- @Override
- public void OnClick (View v) {
- //
- }
- })
- . Show ();
Copy Code
2.ActionSheetDialog, it's almost alertdialog .
- New Actionsheetdialog (mainactivity.this). Builder ()
- . Settitle ("title")
- . Setcancelable (False)
- . Setcanceledontouchoutside (False)
- . Addsheetitem ("entry name one", Sheetitemcolor.red,
- New Onsheetitemclicklistener () {
- & nbsp; & nbsp; @Override
- & nbsp; & nbsp; public void OnClick (int which) {
- }
- })
- . Addsheetitem ("Entry name II", Sheetitemcolor.red,
- New Onsheetitemclicklistener () {
- & nbsp; & nbsp; @Override
- & nbsp; & nbsp; public void OnClick (int which) {
- }
- })
- Multiple Sheetitem can be added
- . Show ();
Copy Code
Code Download: http://download.csdn.net/detail/xiechengfa/8067275
Two kinds of dialog boxes for imitation IOS7