今天练习的时候想写一个控件在另一个左侧,忘了怎么写,搜https://developer.android.google.cn/index.html结果搜RelativeLayout 然后在里边搜layout_toRightOf一直找不到这个属性,不是说我找错了 希望大虾们不吝赐教啊
在网页搜索框中输入关键字,如下图:
然后在出来的页面中按 Ctrl + F,查找 layout_toRightOf,如果没有直接定位到您想要的内容,再点击查找下一个,如下图:
最后搜索结果如下图:
用心回答每个问题,如果有帮助,请采纳答案好吗,谢谢~~~
<?xml version="1.0" encoding="utf-8"?>
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="cn.com.shengchuang.retrofit02.MainActivity">
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="Hellow World" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_toRightOf="@+id/text"
android:src="@mipmap/ic_launcher_round" />
这样就OK了