不用wrap_content.match_parent来指定 控件的大小,
1.在app/bulid.gradle文件的dependencies中添加
compile 'com.android.support:percent:24.2.1(注意在添加文件之后要同步一下)
2.修改布局文件xml文件中的布局
比如<Button android:id="@+id/button1"
android:text="button 1"
android:layout_gravit="left|toop"
app:layout_widthPercent="50%"
app:layout_heightPercent="20%"
/>