Android Layout - when to use app: vs android:?

后端 未结 5 1362
囚心锁ツ
囚心锁ツ 2020-12-25 14:30

I\'ve been writing some Android apps but I don\'t really understand when to use app: and when to use android:. When styles are not being applied th

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-25 15:26

    moreover you will find two variants

    xmlns:app="http://schemas.android.com/apk/res-auto" 
    
    xmlns:app="http://schemas.android.com/apk/[packagename]"
    

    the difference between xmlns lines is res-auto take care of resolving our package as sometime we will add .debug or .test in our package and we already provided the packageid of the app Ex:

    xmlns:app="http://schemas.android.com/apk/com.test.io.debug"
    xmlns:app="http://schemas.android.com/apk/com.test.io.test"
    

提交回复
热议问题