【发布时间】:2013-02-08 19:21:08
【问题描述】:
我需要创建一个包含两个图像的布局。(我正在附加图像文件)。图像应该是第一个应该重叠在第二个上。有人可以帮助我,因为我是 android 的新手任何帮助都会很明显。实际上有两张图像,一张是普通图像,另一张有斜线。我想让结果图像看起来像下面的
【问题讨论】:
-
一个简单的 XML 代码会很好
标签: android
我需要创建一个包含两个图像的布局。(我正在附加图像文件)。图像应该是第一个应该重叠在第二个上。有人可以帮助我,因为我是 android 的新手任何帮助都会很明显。实际上有两张图像,一张是普通图像,另一张有斜线。我想让结果图像看起来像下面的
【问题讨论】:
标签: android
你需要这样的框架布局:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/image1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/image1"/>
<ImageView
android:id="@+id/image2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/image2"/>
这将使项目彼此重叠。 :)
【讨论】: