解决方案 »

  1.   

    你这是线型布局 如果控件过大 会把其他按钮挤到下面去,可以用ScrollView套一层。
      

  2.   

    <ScrollView>
       <LinearLayout>  </LinearLayout></ScrollView>
      

  3.   

    用相对布局
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >    <LinearLayout
            android:id="@+id/linearLayout_1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:orientation="vertical" >        <EditText
                android:layout_width="200dp"
                android:layout_height="35dp"
                android:layout_gravity="center"
                android:autoLink="web"
                android:hint="输入要查找的商品" />        <android.support.v4.view.ViewPager
                android:id="@+id/adv_pager"
                android:layout_width="fill_parent"
                android:layout_height="70dp" >
            </android.support.v4.view.ViewPager>        <LinearLayout
                android:id="@+id/viewGroup"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/adv_pager"
                android:layout_marginTop="-25px"
                android:gravity="right"
                android:orientation="horizontal" >            <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="left"
                    android:layout_marginTop="5dp"
                    android:text="品种分类" />            <GridView
                    android:id="@+id/gridview1"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:numColumns="2" >
                </GridView>
            </LinearLayout>
        </LinearLayout>    <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/relativeLayout21"
            android:layout_gravity="bottom" >        <Button
                android:id="@+id/button1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:text="首页" />        <Button
                android:id="@+id/button2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_toRightOf="@+id/button1"
                android:text="搜索" />        <Button
                android:id="@+id/button3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_toRightOf="@+id/button2"
                android:text="我的" />        <Button
                android:id="@+id/button4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_toRightOf="@+id/button3"
                android:text="更多" />
        </RelativeLayout>    <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@id/relativeLayout21"
            android:layout_below="@id/linearLayout_1"
            android:background="@drawable/logo" />
    </RelativeLayout>先把固定的位置布局好,中间的imageview再布局到顶部和底部中间去