我的布局中有以下内容;
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:descendantFocusability="beforeDescendants"
android:id="@+id/layoutId">
<data>
<variable name="data" type="com.example.android.Person"/>
</data>
<TextView ... //**YES** Intellisense or autocompletion
<merge>
<TextView ... //No Intellisense or autocompletion
<Spinner ... //No Intellisense or autocompletion
</merge>
</layout>
我试图在<merge>
标记内使用的任何XML标记都不会弹出智能感知或自动完成。
我尝试了以下内容;
似乎没什么用。
智能感知/自动完成功能在之外标签,但不在其中。
拜托,有没有人有解决方案?
我将<merge>
更改为Android ViewGroup
(在我的情况下为LinearLayout
),然后在我的根布局中使用了ViewStub
。
答案 0 :(得分:1)