大虾们好:
小弟碰到一个问题,是写的main.xml中布局写好了,但当切为横屏的时候在viewfilpper 布局中的width 却只占屏幕的2/3
以下是我的布局文件<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFF"
android:id="@+id/main"
>
<ViewFlipper
android:id="@+id/ViewFlipper01"
android:layout_width="fill_parent"
android:layout_height="380dip"
>
</ViewFlipper>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:layout_gravity="bottom"
android:gravity="bottom"
android:background="@drawable/buttonbar" >
<Button
android:layout_width="50dip"
android:layout_height="50dip"
android:id="@+id/menu_list"
android:layout_marginLeft="2dip"
android:background="@drawable/bottom_menu"
/>
</LinearLayout>
</FrameLayout>
下面的按钮条宽度到是在切换的时候能占满宽度,在ViewFillper里面装的是ScrollView 求解
小弟碰到一个问题,是写的main.xml中布局写好了,但当切为横屏的时候在viewfilpper 布局中的width 却只占屏幕的2/3
以下是我的布局文件<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFF"
android:id="@+id/main"
>
<ViewFlipper
android:id="@+id/ViewFlipper01"
android:layout_width="fill_parent"
android:layout_height="380dip"
>
</ViewFlipper>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:layout_gravity="bottom"
android:gravity="bottom"
android:background="@drawable/buttonbar" >
<Button
android:layout_width="50dip"
android:layout_height="50dip"
android:id="@+id/menu_list"
android:layout_marginLeft="2dip"
android:background="@drawable/bottom_menu"
/>
</LinearLayout>
</FrameLayout>
下面的按钮条宽度到是在切换的时候能占满宽度,在ViewFillper里面装的是ScrollView 求解
解决方案 »
- 菜鸟求助 这么简单一个登陆获取字符串的程序为什么无法运行可通过编译。。。。麻烦看下谢谢了
- Android上的FireFox的“选择文件”的对话框是怎么实现的?
- 新手求助!android合并程序的方法
- 相机拍照后储存照片如何实现?
- R.id.widget29_getName_EditText,这里面如何定义EditText控件
- android 手机如何保持登陆状态
- 安卓activity之间互相通信的问题
- 怎么判断SharedPreferences 的某个记录已存在呢
- Activity跳转时传数据
- Bmob_APP_KEY从哪看
- 关于访问服务器的问题
- Android 访问.NETWebService 遇到的问题,急求教!!
setContentView(R.layout.a1);
} else if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { setContentView(R.layout.a1); } 创建两个 layout-land和layout-port文件 在运行的时候程序会自动判断横竖屏