在android 2.3.3上,版面边距不起作用

在android 2.3.3上,版面边距不起作用,android,android-linearlayout,margins,Android,Android Linearlayout,Margins,所以我的问题是,当我在Droid2.3设备上启动我的项目时,布局边距不起作用。但在4.0.3及更高版本上,它可以工作。我不明白我哪里出错了,我有两个相同的设备(华为荣誉)和不同的操作系统(姜饼和IC),我真的不明白为什么我的布局边距在我的姜饼设备上不起作用。下面是截图: XML 您可能需要尝试填充,类似的效果。如果它不起作用,你可以考虑用固定长度放一个额外的视图。这可能不是一个好的解决方案,但它应该会起作用。希望有帮助。您可能想尝试填充,类似的效果。如果它不起作用,你可以考虑用固定长度放一

所以我的问题是,当我在Droid2.3设备上启动我的项目时,布局边距不起作用。但在4.0.3及更高版本上,它可以工作。我不明白我哪里出错了,我有两个相同的设备(华为荣誉)和不同的操作系统(姜饼和IC),我真的不明白为什么我的布局边距在我的姜饼设备上不起作用。下面是截图:

XML



您可能需要尝试填充,类似的效果。如果它不起作用,你可以考虑用固定长度放一个额外的视图。这可能不是一个好的解决方案,但它应该会起作用。希望有帮助。

您可能想尝试填充,类似的效果。如果它不起作用,你可以考虑用固定长度放一个额外的视图。这可能不是一个好的解决方案,但它应该会起作用。希望有帮助。

例如,如果你想在页边空白处加上页边空白,你需要加上
android:layout\u gravity=“top”
。这是我的工作。希望有帮助。

例如,如果你想在页边空白处加上页边空白,你需要加上
android:layout\u gravity=“top”
。这是我的工作。希望能有帮助。

我不知道为什么,但很好!我不知道为什么,但是很好!
<?xml version="1.0" encoding="utf-8"?>
<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/flipper"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@color/app_background" >

<include
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    layout="@layout/layout_pleasewait" />

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_marginLeft="15dp"
    android:layout_marginRight="15dp"
    android:orientation="vertical" >

    <View
        android:id="@+id/divider1"
        android:layout_width="fill_parent"
        android:layout_height="1dp"
        android:layout_marginTop="@dimen/divider_margin"
        android:background="@color/layout_divider_bold" />

    <ExpandableListView
        android:id="@+id/firmsList"
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:cacheColorHint="#00000000"
        android:divider="@color/layout_divider"
        android:dividerHeight="1dp"
        android:groupIndicator="@null" >
    </ExpandableListView>
</LinearLayout>

<include
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    layout="@layout/layout_no_internet" />

<include
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    layout="@layout/layout_no_searchresult" />
</ViewFlipper>