首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >android预览不适用于使用合并工具的布局文件:parentTag

android预览不适用于使用合并工具的布局文件:parentTag
EN

Stack Overflow用户
提问于 2018-08-30 02:16:31
回答 1查看 629关注 0票数 0

根据这一讨论,android布局文件可以使用工具:parentTag来预览使用标记的布局。我尝试了一些工具:父母标签和预览变得空了。如果我删除tools:parentTag,预览就可以工作,所以我确信是tools:parentTag使预览无法工作。

这是我的布局代码:

代码语言:javascript
复制
<?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>

在这里输入图像描述

有什么办法解决这个问题吗?

EN

回答 1

Stack Overflow用户

发布于 2018-08-30 07:31:53

你失踪了

代码语言:javascript
复制
android:layout_width="match_parent"
android:layout_height="match_parent"

用于merge标记

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52088345

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档