Android Imageview顶部的Textview在2.x中工作,但文本在ICS中消失
我想这样做:Android Imageview顶部的Textview在2.x中工作,但文本在ICS中消失,android,android-layout,android-4.0-ice-cream-sandwich,Android,Android Layout,Android 4.0 Ice Cream Sandwich,我想这样做: 由于某些原因,当我将targetSdk更改为14时,不会显示ImageView。有人知道发生了什么吗 RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <ImageView android:id="@+id/ven
由于某些原因,当我将targetSdk更改为14时,不会显示ImageView。有人知道发生了什么吗
RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/venueinformation_header_imageview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:contentDescription="Venue Information Header"
android:src="@drawable/venueinformation_header_image" />
<TextView
android:id="@+id/venueinformation_header_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:gravity="right"
android:text="@string/venuinformation_header_label"
android:textSize="55sp" />
</RelativeLayout>
RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android"
android:layout\u width=“匹配父项”
android:layout\u height=“match\u parent”>
谢谢您有两种选择:
我想出来了。图像本身有问题。我觉得它太大了。我把它变小了,它工作了。我弄明白了。图像本身有问题。我觉得它太大了。我把它做得更小了,它还能工作。但在2.x中这是如何工作的?我尝试将这两个元素作为相对布局的子元素放在框架布局中,但没有成功。我还有其他一些东西没有包含在我发布的代码中,我不想在框架布局中移动。但是这在2.x中是如何工作的呢?我尝试将这两个元素作为相对布局的子元素放在框架布局中,但没有成功。我还有其他一些东西没有包括在我发布的代码中,我不想在框架布局中移动。你可以保留相同的图像并在应用程序中缩放它。这意味着它将在任何大小的屏幕上显示良好。是否认为该地产的规模更小,或者重量/大小更小?只是好奇限制在哪里。谢谢。我也有同样的问题——图像太大了。不确定是否有过多的字节或像素是它不喜欢的,但缩小我照片的大小是有效的。你可以保留相同的图像并在应用程序中缩放它。这意味着它将在任何大小的屏幕上显示良好。是否认为该地产的规模更小,或者重量/大小更小?只是好奇限制在哪里。谢谢。我也有同样的问题——图像太大了。不确定是否有过多的字节或像素是它不喜欢的,但缩小我的照片的大小是有效的。