android .9横向拉伸,Android没有在横向模式下自己拉伸布局

我试图在横向模式下放置两个图像,因为我的应用程序将以横向模式穿过。当我在做下面的代码时,android在potrait模式下工作正常,但是在横向模式下,它确实按照比例拉伸,但保持不变。我应该怎么做,使之由AndroidAndroid没有在横向模式下自己拉伸布局

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:orientation="horizontal" >

android:id="@+id/frameLayout1"

android:layout_width="wrap_content"

android:layout_height="match_parent"

android:fitsSystemWindows="true"

android:layout_gravity="center_horizontal" >

android:id="@+id/imageView1"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:src="@drawable/hud" />

android:id="@+id/frameLayout2"

android:layout_width="wrap_content"

android:layout_height="match_parent"

android:fitsSystemWindows="true"

android:layout_gravity="center_horizontal">

android:id="@+id/imageView2"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:layout_gravity="center_horizontal"

android:src="@drawable/bg" />

+0

不相关,但不应该混合'fill_parent'和'match_parent'。如果您的API为1.6+,请使用'fill_parent'。如果您的API为2.1+,请使用'match_parent'。 –

2012-02-14 14:24:58

+0

使用LinearLayout而不是FrameLayout,那么你也应该使用android:layout_weight =“1”来更好地理解外观[here](http://developer.android.com/resources/tutorials/views/hello-linearlayout.html) –

2012-02-14 14:27:49

+0

什么你想要做什么?你想修改风景模式的布局吗?还是想用ImageView做其他事情?最佳实践 –

2012-02-15 12:55:26

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值