0
这是为了增加相同的空间视图布局之间的解决方案: make same space between button in linearlayout让按键之间的同一个空间中HorizontalScrollView
但是,让我们说我们有很多项目,我们需要把他们HorizontalScrollView为手机设备。
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<LinearLayout
android:id="@+id/shareLinearLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/btnRequestAPrescriptionRefill"
android:layout_marginTop="10dp" >
<Button
android:id="@+id/btnFacebook"
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/btn_facebook" />
<View
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_weight="1" />
...
</LinearLayout>
</HorizontalScrollView>
该解决方案对手机工作正常,但在平板电脑中,我们有一个大屏幕大小,按钮之间的空间不工作。按钮只是粘在一起,没有我们创建的空间:
<View
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_weight="1" />
有没有解决方法?
谢谢你的提示。看来你是对的。这在某种程度上是矛盾的,我必须用多个XML来处理它。 +1。 – Ali