Several instance methods of intent transfer object in Android series

In Android, there are two main methods for intent to transfer objects: bundle. Putserializable (key, object) and bundle. Putparcelable (key, object); Of course, these objects have certain conditions. The former implements the serializable interface, while the latter implements the Parcelable interface. The following is an example I made for you. First, we establish a project named objecttestdemo, and then we modify the main.xml layout file, mainly adding two buttons view layout to clipboard print?

code

code

The following is the most important step: modify the androidmanifest.xml file (add two new activities, objecttestdemo1 and objecttestdemo2). The code is as follows (lines 14 and 15):

code

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>