开发者

Is there a way to make eclipse detect your custom view as its parent layout?

I've c开发者_运维百科reated a custom view extending RelativeLayout, and added its complete name in an xml layout file,, Its working fine I am just asking is there a way to make eclipse detect my parent layout as a RelativeLayout in order to auto-complete and suggest the tags related to RelativeLayout not give me blank suggestion and saying eclipse does't know any direct childs 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>


This was a bug in an older ADT, and its now fixed.

Reference


I am not sure that this is going to work, but try

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜