我想按照下图来制作我的布局。这个图像我能够在iPhone设备中看到。在imageview上叠加顶部和底部图像问题
这里我使用了框架布局来实现imageview顶部和底部图像栏的叠加,但是在使用框架布局后,我只能看到顶部图像栏叠加而不是底部图像栏?为什么会发生?
忘记了顶部和底部图标栏的内容..我正在专注于实现此功能。
如果我在我的代码中有错,请让我正确。
xml文件代码:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<include
android:id="@+id/top_bar"
layout="@layout/item_below_image_bar"
android:gravity="top" />
<it.sephiroth.android.library.imagezoom.ImageViewTouch
android:id="@+id/image"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:adjustViewBounds="true"
android:contentDescription="@string/descr_image"
android:scaleType="fitXY" />
<include
android:id="@+id/below_bar"
layout="@layout/item_below_image_bar"
android:gravity="bottom" />
</FrameLayout>
介意在'item_below_image_bar'和'item_below_image_bar'上发布您的代码?无论如何,请尝试设置'android:layout_gravity =“top”'或'android:layout_gravity =“bottom”'。设置引力并不影响任何东西。 – 2013-05-03 17:07:02
我已经添加了两种布局的重力。它不起作用 – 2013-05-03 17:15:18
你试过重新排列视图吗?我认为您的图片视图需要位于xml底部 – Eluvatar 2013-05-03 17:16:01