Example of iPhone-like Style dialog box, jar package and source code

Source: Internet
Author: User

:

 

This dialog box is fully inherited and modeled like alertdialog, but only achieves custom effects.
In addition, seticon is not implemented because most of the dialogs on the iPhone do not have icons.

The attachment contains examples, Jar packages, and jar package source code.

Usage:
1. Like the previous page flip control, set build path first, introduce the jar package, and thenCodeAdd in

 
Import CN. fiker. Lib. iphonedialog .*;

2. Copy the following resources to the project.
Images in the drawable directory;
Three items in style. xml and strings. xml under values (yes, no, and canceled)
Dialog_iphone.xml in Layout

3. Use this dialog box just like using normal alertdialog.

Iphonedialogbuilder IB = new iphonedialogbuilder (this); Ib. settitle ("dialog box example"); Ib. setmessage ("this is a dialog box with only one button. "); IB. setpositivebutton (R. string. yes, new dialoginterface. onclicklistener () {@ override public void onclick (dialoginterface dialog, int which) {toast. maketext (main. this, "you have selected" yes ", toast. length_short ). show (); dialog. dismiss () ;}}); IB. show ();

Source code download: http://files.cnblogs.com/feifei1010/iPhoneDialog.rar

Welcome to Weibo http://e.weibo.com/u/2975543812

Invite everyone to participate in the blog rewards activity ~ See http://www.apkbus.com/android-64183-1-1.html

Reference: http://www.apkbus.com/android-17062-1-1.html

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.