Difference between android: and app: prefix in Android XML?

后端 未结 4 1868
情深已故
情深已故 2020-12-03 00:59

What is the difference and more importantly the necessity of having different prefixes in Andriod view XML?

For example,



        
4条回答
  •  生来不讨喜
    2020-12-03 01:14

    android is usually used for attribute coming from Android SDK itself.

    app is often used if you are using the support library.

    You may also see other namespaces if you are using custom views (of your own or form a library).

    Here is some extra information: http://developer.android.com/training/custom-views/create-view.html#customattr

提交回复
热议问题