suppender of AndroidStudy
12/16/2016 - 2:23 PM

<-- The attributes that you can use are: layout_widthPercent layout_heightPercent layout_marginPercent layout_marginLeftPercent layout_margi

<-- The attributes that you can use are: layout_widthPercent layout_heightPercent layout_marginPercent layout_marginLeftPercent layout_marginTopPercent layout_marginRightPercent layout_marginBottomPercent layout_marginStartPercent layout_marginEndPercent layout_aspectRatio --/>

<-- 如果你想要该View能够占用比设置的百分比值更大的空间时,你可以指定layout_widht/height=“wrap_content”。 --/>

<android.support.percent.PercentFrameLayout
         xmlns:android="http://schemas.android.com/apk/res/android"
         xmlns:app="http://schemas.android.com/apk/res-auto"
         android:layout_width="match_parent"
         android:layout_height="match_parent">
     <ImageView
         app:layout_widthPercent="50%"
         app:layout_heightPercent="50%"
         app:layout_marginTopPercent="25%"
         app:layout_marginLeftPercent="25%"/>
 </android.support.percent.PercentFrameLayout>