views:

53

answers:

1

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.

A: 

When you want to edit the properties of view just replace your com.test.CustomLinearLayout with LinearLayout. Then you can see the view in properties and can edit the properties. After you finish editing then revert the tag to original one that is from LinearLayout to com.test.CustomLinearLayout

sachin
Thanks for responding. That's exactly what I've been doing since posting this, but I was hoping there was a fix or a report of this as actually being a bug. Having to switch back and forth gets to be a pain when you have to do it for multiple custom layouts. I can't imagine this is what the Google engineers intended the IDE/SDK to do. Thanks again.
borg17of20
I am also doing the same. After lot of search i found that there is no other than doing this..
sachin