发先一个ViewGroup超好用的属性。
android:clipChildren 是否裁剪子布局
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
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="com.dqs.shangri.clipchildren.MainActivity"
android:clipChildren="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_marginTop="200dp"
android:background="@color/colorAccent"
android:gravity="bottom">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
android:layout_gravity="center_vertical"/>