我尝试用textView显示我的relativeLayout的底部30dp部分:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/refresh_layout"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop= "-20dp"
android:padding="10dp">
<TextView
android:id = "@+id/refresh_textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pull down..."
android:layout_centerInParent="true"
android:textColor="@color/sys_gray"/>
</RelativeLayout>
<!--(...there are many elements here)-->
</RelativeLayout>
但是当我这样写时,RelativeLayout和textView都不会显示。他们躲在父亲RelativeLayout之外。是否有任何属性让他们在父亲RelativeLayout中显示一半(不是整个TextView和RelativeLayout)?