Is there a way to get eclipse to define your custom view as the parent layout?

I created a custom view extending RelativeLayout and added its full name in the xml layout file. Its working fine, I just ask if there is a way to get eclipse to define the parent layout as RelativeLayout so that it is auto-complete and suggest tags related to RelativeLayout do not give me an empty sentence and say that eclipse does not know any direct children for this component .

<com.mypackage.myview> 
<!-- I want eclipse to detect that myView which is in com.mypackage extends RelativeLayout and show the suggestions such as Layout_align_parent_left-->
<Button ............... />
<TextView..................../>
</com.mypackage.myview>
+3
source share
2 answers

This was a bug in the old ADT, and now it is fixed.

Link

+2
source

I'm not sure this will work, but try

<RelativeLayout class="com.mypackage.myview" ...> 
    <Button .../>
    <TextView .../>
</RelativeLayout>
0
source

All Articles