5

I'm adding some animation to a wearable app which is implemented in a class derived from RelativeLayout:

package wear.com.watchgui;
public class RippleBackground extends RelativeLayout {...}

If I try and use this within rect_activty_main.xml as follows:

<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 ....

Then the problem is that its impossible to do anything with Android Studio Designer - its not possible add new widgets, or drag around and move existing ones etc. The Android Studio graphical interface is totally unusable as if the GUI is locked and can't be edited.

I can make changes using the text editor interface to directly edit the layout xml but I can't do anything using the graphical editor interface.

Does anybody know why I'm getting this issue and if there is a solution?

Gruntcakes
  • 37,738
  • 44
  • 184
  • 378

2 Answers2

4

This has been an issue for awhile now.

It appears to have been fixed in Android Studio 1.3.0.

You can find it here

Christian Grün
  • 6,012
  • 18
  • 34
tachyonflux
  • 20,103
  • 7
  • 48
  • 67
  • 1
    I initially got the problem with 1.3 beta, however after upgrading to 1.3 non beta the issue for me still remains. – Gruntcakes Aug 03 '15 at 15:29
  • It might also be related to the theme: http://stackoverflow.com/questions/30494981/android-studio-1-2-1-1-layout-preview-problems/30495858#30495858. Also, I assume you are using the latest SDK Tools and Build Tools? – tachyonflux Aug 03 '15 at 19:15
0

try to do this change api from toolbar in designer view and set it 21 this issue become after release Android M Developer Review

Amjad Alwareh
  • 2,926
  • 22
  • 27