Learning content: Activity interactions, UI fragment components
====activity Interactive = = =
The scenario is typically the current activity requesting another activity display detail (such as personal details), or dealing with associative logic (such as editing a picture)
When two or more of the activity is ready, the basic process is as follows:
1. Add the activity information to the Androidmanifest.xml file as follows:
<manifest xmlns:android= "Http://schemas.android.com/apk/res/android"
package= "Package.name">
<activity
Android:name= ". Cheatactivity "
Android:label= "@string/app_name"/>
</manifest>
android:name Midpoint number indicates that the package in manifest is populated as a prefix
2. Use the Startactivity/startactivityforresult method to start another activity view. The difference between the two methods is whether the information is returned
To the activity caller, the process is as follows:
The interaction between 3.Activity is the use of the intent component, the intent component is responsible for communicating with the OS, information interaction, not directly to the activity between each other
Communication, but the advantage of using intent as a middleware is that you can launch specific activity across apps, and if I request to open a Web page, the corresponding browser should
The activity itself does not require the ability to process Web pages.
Intent: primarily responsible for interacting with the OS, and can carry additional information so that data can be made between two activity
Transmission, it has two forms: display and implicit, the display is explicitly specified activity, generally is the application of the internal situation; The implicit situation is mostly external
Application, because in general I don't know what the external applications are, so make an implicit call and let the specific application respond to my call request!
====ui fragment Components = = = =
Fragment is a flexible UI component attached to the activity, which makes the UI attempt to layout, processing is quite flexible, the current application is more, it has and
Activity-similar lifecycles and view views handle UI interactions, and have their own separate layout files, using the same way as the activity component lei-like!
Fragment focus needs to be familiar with life cycle and management methods:
A) Life cycle
============================================
B) Management method
====================================
Android Learning-fifth day