gpt4 book ai didi

android - 相对布局未将按钮放置到位

转载 作者:行者123 更新时间:2023-11-30 04:26:38 25 4
gpt4 key购买 nike

我正在使用此代码;

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />

<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:text="Button" />

</RelativeLayout>

出于某种原因,这在 540x960 的模拟器中不起作用。该按钮出现在模拟器的中间。

在我的 droid2 中它工作正常。

enter image description here

左图显示它在我的 droid 2 手机上如何工作,右图显示它在 HTC sensationXe 模拟器上如何工作

最佳答案

我已经找到了问题的答案。我正在将我的应用程序编译为 android 1.5,现在我将其添加到 list 中

<uses-sdk android:minSdkVersion="3"
android:targetSdkVersion="4" />

然后我编译到android 1.6

现在它在它必须在的地方

关于android - 相对布局未将按钮放置到位,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8370039/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com