Android -- SDK/IDE Layout Bug (w/Custom Layouts)??

Posted by borg17of20 on Stack Overflow See other posts from Stack Overflow or by borg17of20
Published on 2010-05-31T10:37:22Z Indexed on 2010/05/31 10:43 UTC
Read the original article Hit count: 253

Filed under:
|
|
|
|

Hello all, Can someone tell me if this is a bug in the SDK/IDE:

Any custom or extended layout I add to my layout XML causes the IDE to ignore the fact that there are any child views of that layout (they just disappear from the outline view/window), thus making them uneditable via the properties view/window. (I need to extend a layout to make onSetAlpha() public)

FYI: I'm developing for Android 1.5 and up, using all the latest plug-ins/updates in Eclipse

Here is a simple example of a layout XML and the extended Layout that causes this error.

[Extended Layout]

package com.test;
public class CustomLinearLayout extends LinearLayout
{

    public CustomLinearLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public CustomLinearLayout(Context context) {
        super(context);
    }
}

[Simple layout XML]

<?xml version="1.0" encoding="utf-8"?>
<com.test.CustomLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
  <ImageView android:id="@+id/ImageView01"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"></ImageView>
</com.test.CustomLinearLayout>

ImageView01 is not visible or editable in the properties or outline views/windows.

Thanks.

© Stack Overflow or respective owner

Related posts about android

Related posts about ide