从最近ADT的新版本开始,我注意到布局XML文件上的这个新属性,例如:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
tools:context=".MainActivity" />
“工具:上下文”的用途是什么?
它怎么知道写在那里的活动的确切路径?它会查看manifest里面的应用程序包吗?
它局限于扩展Context的类还是仅仅局限于活动?它对ListView项目等有用吗?