Android布局覆盖问题 android布局 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你这是线型布局 如果控件过大 会把其他按钮挤到下面去,可以用ScrollView套一层。 <ScrollView> <LinearLayout> </LinearLayout></ScrollView> 用相对布局<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再布局到顶部和底部中间去 Spinner 控件 怎么判断Android手机是否开启USB调试? Android中的View类,Graphics类和Canvas类之间是什么关系啊 怎么做锁屏界面上弹出一个对话框 android启动多个应用程序 ffmpeg移植问题 急问:Android 1.6 支持h.264么?还是只是支持部分? 在onkeydown中再次使用ft.commit报错 TableRow中动态布局之后,控件不显示 不会写android后端正常吗? 求SlidingMenu+Fragment 实际运用思路 布局问题
<LinearLayout> </LinearLayout></ScrollView>
<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再布局到顶部和底部中间去