无法将Studio Designer与自定义RelativeLayout派生类一起使用

Gru*_*kes 5 android android-layout android-studio wear-os

我正在为可穿戴应用添加一些动画,该应用是在从RelativeLayout派生的类中实现的:

package wear.com.watchgui;
public class RippleBackground extends RelativeLayout {...}
Run Code Online (Sandbox Code Playgroud)

如果我尝试在rect_activty_main.xml中使用它,如下所示:

<wear.com.watchgui.RippleBackground xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
    android:layout_height="match_parent" android:orientation="vertical"
    tools:context=".MainActivity" tools:deviceIds="wear_square"
    android:id="@+id/overlayLayout"
    android:clickable="true"
    android:background="#0288d1">
    <TextView ....
Run Code Online (Sandbox Code Playgroud)

然后问题是它无法用Android Studio Designer做任何事情 - 它不可能添加新的小部件,或者拖动并移动现有的小部件等.Android Studio图形界面完全无法使用,好像GUI被锁定而不能编辑.

我可以使用文本编辑器界面进行更改,直接编辑布局xml,但我无法使用图形编辑器界面执行任何操作.

有人知道我为什么会遇到这个问题,是否有解决方案?

tac*_*lux 4

这已经成为一个问题有一段时间了。

它似乎已在 Android Studio 1.3.0 中修复。

你可以在这里找到它