根据这一讨论,android布局文件可以使用工具:parentTag来预览使用标记的布局。我尝试了一些工具:父母标签和预览变得空了。如果我删除tools:parentTag,预览就可以工作,所以我确信是tools:parentTag使预览无法工作。
这是我的布局代码:
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:orientation="vertical"
tools:parentTag="android.widget.LinearLayout">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="hello" />
</merge>有什么办法解决这个问题吗?
发布于 2018-08-30 07:31:53
你失踪了
android:layout_width="match_parent"
android:layout_height="match_parent"用于merge标记
https://stackoverflow.com/questions/52088345
复制相似问题