后面的引用控件是@+id还是@id呢 比如layout_below="@+id/xxx还是@id/xxx 但是用@id/xxx的话as渲染的时候提示Rendering Problems(eclipse中有+和没+都能渲染出来运行效果也是一样的)as中有+和没+号运行也一样 就是没+号的时候布局渲染提示有问题 但是在之前的学习中印象是没+号的 +号是创建id 没+号是引用其他控件啊 有没有大神解答一下啊
6条回答
取个名 2016-03-30 09:13关注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"解决 无用评论 打赏 举报