android中xml tools属性

2017-08-07  本文已影响8人  3Q竹林

    tools:text  //预览文本信息

    tools:ignore    //忽略某些警告

    tools:targetApi //指定所使用的版本

    tools:locale    //语言指定,去除拼写错误提示(如:在执行拼写检查时,告诉studio本地语言不是英语)

    tools:context   //告诉ide在预览布局的时候该采用什么样的主题

    tools:menu      //告诉IDE 在预览窗口中使用哪个菜单

    tools:actionBarNavMode  //告诉ide  app bar(Material中对actionbar的称呼)的显示模式

    tools:listitem/listheader/listfooter //在ListView、ExpandableListView、GridView的预览效果中添加子item/头部/尾部的预览布局(注意:android:id="@+id/xxx"必须有才能显示出来),另外在RecyclerView中只有 tools:listitem属性;

    tools:showIn    //告诉Ide该布局已经被内置到其他布局(通过include或listitem等方式),并展示的是该布局所嵌入的那个布局的全貌;

    tools:layout    //告诉ide,Fragment在程序预览的时候该显示成什么样(注意:只用于Fragment);

网址推荐: http://blog.csdn.net/Peak1Chen/article/details/51289491

.

上一篇下一篇

猜你喜欢

热点阅读