android percent layout
layout percent support
compile'com.android.support:percent:24.0.0'
PercentRelativeLayout / PercentFrameLayout
- layout_width="0dp"、layout_height="0dp"
- layout_widthPercent、layout_heightPercent
- 如果为wrap_content,选择wrap_contetn与Percent中较大的一个
- layout_marginPercent
- layout_marginTop(Bottom/Left/Right/Start/End)Percent
- android:layout_width="300dp"
- app:layout_aspectRatio="178%"
- 固定宽度或高度,并设置宽:高,1.78:1