在我的项目中,我有一个菜单。对于我想要使用gridView的菜单设计。为简单起见,假定此网格视图只有一个项目。这个项目有两个独立的图像(background.png和news.png)和一个文本(例如“NEWS”)。Android,如何将图片放在另一张图片上?
是否可以通过xml或代码将background.png上的news.png映射到background.png上?
感谢您的帮助。
在我的项目中,我有一个菜单。对于我想要使用gridView的菜单设计。为简单起见,假定此网格视图只有一个项目。这个项目有两个独立的图像(background.png和news.png)和一个文本(例如“NEWS”)。Android,如何将图片放在另一张图片上?
是否可以通过xml或代码将background.png上的news.png映射到background.png上?
感谢您的帮助。
是的你可以随时使用FrameLayout在xml文件中,像这样。
<FrameLayout android:id="@+id/frameLayout1"
android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:id="@+id/imageView1" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:src="@drawable/background"></ImageView>
<ImageView android:id="@+id/imageView2" android:layout_width="wrap_content"
android:layout_gravity="center" android:layout_height="wrap_content"
android:src="@drawable/news"></ImageView>
<TextView android:text="NEWS" android:id="@+id/textView1" android:layout_gravity="bottom|center_horizontal"
android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
</FrameLayout>
你想显示两个图像在另一个... – 2012-02-29 05:11:51
是的,我想知道它是否实用? – Hesam 2012-02-29 05:46:25
@Hesam你有没有找到任何解决方案> – PriyankaChauhan 2016-11-02 10:29:14