Android Tools详解

Adroid Tools

  • 泡网
    http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0309/2567.html

tools:context="com.android.example.MainActivity"
context属性就是称呼的Activity属性,有助于ide加载布局,他可以在Android studio代码中找到相关文件

tools:menu
告诉IDE 在预览窗口中使用哪个菜单,这个菜单将显示在layout的根节点上(actionbar的位置)。

Android Tools详解_第1张图片

tools:ignore
ignore属性是告诉Lint忽略xml中的某些警告。

tools:targetApi="LOLLIPOP"
假设minSdkLevel 15,而你使用了api21中的控件比如RippleDrawable
使用这个可以不显示这个警告

tools:local="it"
tools:locale(本地语言)属性
默认情况下res/values/strings.xml中的字符串会执行拼写检查,如果不是英语,会提示拼写错误,通过以下代码来告诉studio本地语言不是英语,就不会有提示了。
tools:local="it"

你可能感兴趣的:(Android Tools详解)