设置 linearlayout 均分 布局 时,可能会出现问题,这时
只需将linearLayout下 的两个布局widh设为0dp即可,这个问题搞了我好久的说<pre name="code" class="html"> <LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="@dimen/common_container_padding"
android:layout_marginRight="@dimen/common_container_padding"
android:layout_marginTop="@dimen/common_container_padding"
android:layout_weight="1">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/common_container_padding"
android:text="@string/stock_price_lable"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/black"
/>
<TextView
android:id="@+id/tv1_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/common_container_padding"
android:text="35.65"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/stock_change_lable"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/black"
/>
<TextView
android:id="@+id/tv1_percent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:paddingLeft="@dimen/common_container_padding"
android:text="35.65"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/black" />
</LinearLayout>
</LinearLayout>
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAAAxCAYAAAB3RVNkAAAHyklEQVR4Ae1dT2gcVRj/1vYQsAdLpYiHkpakqSnNqcJG0EtTMYkSvOQWwUN2teBhAzUIljTUQ2tg1yK0bC5Cc4uKBNz1kFRFCA3oxYKaZpempEjrQaK2xC20ju+bN2925u3M7mbmm52Z3Tdl+ub9+73vffPtt9+899sJaITH+fPnd4128eLFmj7Ly8tNlTn1remoCjpSA08B4TEzM0OIFhR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