How to Use the DialogFragment and Activity-managed Dialog,
1. Use of the Dialog managed in the Activity: This describes how to use the Dialog managed in the Activity. Create a Dialog box by rewriting onCreateDialog, however, this method is no longer used, and the api says this method has been replaced by DialogFragment. I came into contact with this method because I saw a project with an animation loading instance. Later I checked the api and started to understand DialogFragment.
2. Here we use AlertDialog to create links to various dialogs: There are only some instances and there is no detailed explanation. However, after reading the code, we can find that there is nothing to detail.
3. simple use of DialogFragment: I have learned from this that there are two implementation methods in DialogFragment: onCreateDialog () method or onCreateView () method. Both methods are used when the dialog box is created for the first time. In the API, I learned that the onCreateDialog () method is suitable for directly using AlertDialog to create a dialog box, while the onCreateView () method is suitable for customizing the layout to implement the dialog box.
? This is not detailed, but it is sufficient to understand it. My problem has not been solved yet. The instance I see is used in the Activity to create a dialog box using the onCreateDialog () method. In the onPreparedDialog () method, it is actually a circle of images that keep rotating, the use of multithreading constantly changes the angle of view. Since DialogFragment can be used instead, I really don't know which method should be used to implement the content of onPreparedDialog. So I plan to find a ready-made instance to learn, and the use of the Animation object and the use of the rotate layout file are also very interesting. I plan to know about it recently.
I recently went home, had no network, and had not sorted it out for a long time. As there were more and more problems, I had to hurry up and I had no time to start school.