差异:android:src和tools:src? [英] Difference(s): android:src and tools:src?
本文介绍了差异:android:src和tools:src?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
差异:
android:src
和tools:src
?
Difference(s):
android:src
andtools:src
?
如果有的话,什么时候应该在 android:src
上使用 tools:src
?
If any, when is it considered proper to use tools:src
over android:src
?
推荐答案
如果您在运行时在xml中使用 android:src
,它将显示在应用程序中,而如果您使用xml中的tools:src
,它将仅在Android Studio的预览中显示,而不会在应用程序的运行时显示.
If you are using android:src
in xml during runtime this will show up on the app, whereas if you use tools:src
in xml it will show only on the preview of Android studio and not on the runtime of the app.
这篇关于差异:android:src和tools:src?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文