Android custom message prompt box similar to QQ
When I saw the QQ message prompt box, I felt that the effect was very good. I made a similar display, as shown below:
Click to view short videosThe effect is good. The overall result is the combination of the Translate animation and the FrameLayout layout. Let's take a look at the code below:Activiy_main.xml
Android custom prompt box, android custom
During development, if you feel that the prompt box provided by the system is not easy to understand, developers can customize the style of the prompt box by themselves, mainly inheriting the Dialog
Program directory structure
Key
This article simplifies some content in the online article "android Development Guide-User Interface-dialog box" and adds some of your own understandings. The same content is copyrighted by the original author.Show dialog box
A dialog box is often created and displayed as part of an activity. You shouldProtected dialog
In Android Application Development, Dialog (Dialog box) is often used for simple creation and easy management. The default style of the Dialog box is similar to the Activity of creating a style.First, we will introduce the Builder class under android. app. AlertDialog. Build
In some cases, a prompt message, such as an error message or a short message, needs to be displayed. Android provides two pop-up methods: toasts and alerts.
Toast is a short message prompt. It automatically disappears after a period of time without requiring user interaction. Therefore, it is used to display less important messages created by the token, if you are prompted that a background task is com
Android mobile guard-used by jiugongge, android jiugong
URL: http://www.cnblogs.com/wuyudong/p/5907736.html.
Use the GridView method. Similar to the ListView method, the number of columns (3 columns)
First add the GridView
Data filling (Module name, module image)
Package com. wuyudong. mobilesafe. activity; import com. wuyudong. mobilesafe. r; import
These controls are commonly used, so they are commonly used during operations. Therefore, this part is an important part of Android software development and the content is relatively simple. Introduction to shard types
1. Single-stick operation: A single-stick operation can be seen everywhere in Android. It consists of
Android notes -- date amp; time (date and time Selection dialog box)TimePickerDialog (Time Selection dialog box)
Create TimePickerDialog time dialog box:
1. Create a class to inherit DialogFragement
2. Override the onCreateDialog () method and return a TimePickerDialog object.
3. Implement the OnTimeSetListener interf
Create dialog box creating dialogs
A dialog box is usually a small window before the current activity. The following activities lose focus and the dialog box accepts all user interactions. A dialog box is usually used as a notification or running application.ProgramRelated
When we do development in peacetime, inevitably will use a variety of dialog boxes, I believe that there are other platform development experience of friends will know that most of the platform is only to provide a few of the simplest implementation, if we want to achieve their own specific needs of the dialog box, you may first think, through inheritance and other ways, Rewrite our own dialog box. Of cours
In the map application, a floating search box is often used to search for nearby poi information, and these functions are basically similar. So I checked them online and found them in the SDK documentation in Dev. I have provided a detailed introduction in the Guide, but I have read it in English for a long time.
The function is relatively simple, that is, it is a bit difficult to configure.
First, check
set to the selctor above.
android:button="@drawable/rad_btn_selctor"
② Define an attribute in the style, and then use the android style attribute settings to add the following code to the style:
Then layout it there:
style="@style/MyCheckBox"3. Change the relative position of the text and selection box
This implementation is also very simple. Do you still remember the drawableXxx we
Onsheetitemclicklistener () {@Override public void OnClick (int which) {}}]. Show ();
Break //Setnegativebutton relative Setpositivebutton color to shallow some case r.id.btn:new alertdialog (mainactivity.this). Builder (). Settitle ( "Exit current Account"). Setmsg ("Again consecutive landing days, the variable as QQ talent." Exit QQ may make your existing records return to zero, OK exit? "). Setpositivebutton (" Confirm Exit ", new Onclicklistener () {@Override public void OnClick (View v)
When we do development in peacetime, inevitably use a variety of dialog boxes, I believe that there are other platform development experience friends will know that most of the platform only provides a few of the simplest implementation, if we want to achieve their specific needs of the dialog box, you may first think, through inheritance and other means, Rewrite our own dialog box. Of course, this is a goo
Android provides us with a variety of dialog boxes, of which Alertdialog features are the most powerful and most commonly used. In addition, there are progressdialog,datepickerdialog and timepickerdialog. the Alertdialog.builder class can help us create a dialog box conveniently. The steps are as follows:1. Create a alertdialog.builder object. 2. Call settitle ()
Android official recommendation: How to Create a dialog box for DialogFragment1. Overview DialogFragment was introduced when android 3.0 was launched. Is a Special Fragment used to display a modal dialog box on the content of the Activity. It is typically
. java
Note: This layout is used as the subscriber to publish sticky events. You also need to register EventBus.
Package com. mly. panhouye. eventbustest; import android. support. v7.app. appCompatActivity; import android. OS. bundle; import android. widget. textView; import org. greenrobot. eventbus. eventBus; import
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.