[英]How to add “layout” attribute in Strings.xml of Android resource file
So this is my strings.xml file: 这是我的strings.xml文件:
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res/com.draw.map"
xmlns:tools="http://schemas.android.com/tools">
<style name="dialogBottomIncludeStyle" >
<item name="tools:layout">@layout/include_dialog_bottom</item>
</style>
also tried 也尝试过
<style name="dialogBottomIncludeStyle" >
<item name="layout">@layout/include_dialog_bottom</item>
</style>
An error appears saying says " error: Error: No resource found that matches the given name: attr 'tools:layout'. " 出现一条错误消息,指出“ 错误:错误:找不到与给定名称匹配的资源:attr'tools:layout'。 ”
Thanks for your time 谢谢你的时间
But in my layout file am able to add "layout" attribute 但是在我的布局文件中可以添加“ layout”属性
// try this
<resources>
<string name="styleattributeinresource"> <style name="dialogBottomIncludeStyle" >
<item name="tools:layout">@layout/include_dialog_bottom</item>
</style></string>
</resources>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.