这个。我不明白为什么第一个布局看起来比第二个布局要大,如果最后一个布局的0.6(60%)。layout_weight =“。4”看起来比layout_weight =“。6”大
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight=".4" >
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight=".6">
</RelativeLayout>
</LinearLayout>
它的工作反转,.4大于.6。 –