简体   繁体   中英

What does android:name attribute do?

I want to know what does android:name attribute do? What is this different with class attribute? I use this for fragment.

Both do the same thing: identify the Java class that is the implementation of the fragment. AFAIK, android:name is the preferred attribute to use.

android:name属性指定要在布局中实例化的Fragment类。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM