我正在为可穿戴应用添加一些动画,该应用是在从RelativeLayout派生的类中实现的:
package wear.com.watchgui;
public class RippleBackground extends RelativeLayout {...}
如果我尝试在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 ....
然后问题是它无法用Android Studio Designer做任何事情 - 它不可能添加新的小部件,或者拖动并移动现有的小部件等.Android Studio图形界面完全无法使用,就好像GUI被锁定一样不能编辑。
我可以使用文本编辑器界面进行更改,直接编辑布局xml,但是使用图形编辑器界面我无法做任何事情。
有人知道我为什么会遇到这个问题,是否有解决方案?