我想在一个页面中显示html字符串的内容,并在同一页面中显示一个图像。我试着定义了这样的布局
<RelativeLayout android:layout_width="wrap_content"
android:layout_height="fill_parent" android:background="@drawable/home_bg">
<ImageView android:id="@+id/aboutcmkimage"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:src="@drawable/about"
android:padding="5dip" />
<WebView android:id="@+id/aboutcmk" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:textColor="#000000"
android:layout_toLeftOf="@+id/aboutcmkimage"
android:layout_alignParentTop="true" android:layout_alignParentLeft="true" />
</RelativeLayout>问题是,显示是以两个不同的列出现的。html字符串显示在第一列,图像显示在下一列。我希望两者混合在一起,看起来像一个单独的页面。我想要的文字来左侧的图像和所有的空间下面的图像。请帮助我实现这一点。非常感谢您抽出时间来
发布于 2011-12-06 13:48:36
尝试框架布局或合并。这里给出了一个很好的例子- http://developer.android.com/resources/articles/layout-tricks-merge.html
https://stackoverflow.com/questions/8395816
复制相似问题