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

后端 未结 5 1358
囚心锁ツ
囚心锁ツ 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:17

    You can use the app namespace to have app compatibility with older API versions.

    For example app:srcCompat="@drawable/customborder" has the same effects with android:background="@drawable/customborder" The difference is that the first will work correctly with older API's and the second will not display what you would like.

提交回复
热议问题