发现个relativelayout的小问题 后面的layout_below above toleftof和torightof

后面的引用控件是@+id还是@id呢 比如layout_below="@+id/xxx还是@id/xxx 但是用@id/xxx的话as渲染的时候提示Rendering Problems(eclipse中有+和没+都能渲染出来运行效果也是一样的)as中有+和没+号运行也一样 就是没+号的时候布局渲染提示有问题 但是在之前的学习中印象是没+号的 +号是创建id 没+号是引用其他控件啊 有没有大神解答一下啊

android:layout_width="match_parent"
android:layout_height="match_parent">

    <Button
        android:layout_toRightOf="@id/bu1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="dad"/>

    <Button
        android:id="@+id/bu1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="sad"/>

</RelativeLayout>


    这样写在as中没问题,但是在eclipse中两个按钮会重叠在一起,除非改为android:layout_toRightOf="@+id/bu1"

不用+号的时候,在代码中上面那个button需要放到下面那个的下面

基本上都是是@+id

本人一直使用AS,添加ID正确格式为:android:id=@+id/具体name;

是不是位置问题呢,先要创建id了才能引用

用id的时候,是按照控件id的顺序,即此id在xml布局文件中必须在此控件之上已声明的,用+id可以无此顾忌