我在调用图片进行查看时遇到问题。在我的应用程序中,他们单击按钮后,我想将他们带到一个新页面,其中将显示图片并在其下方显示一些文本。对于这个例子,如果狗位于页面顶部,那么我想要一张图片,然后在它下面说我想要诸如品种和品种成本之类的东西。谁能帮我?
在您的页面中使用此 XML 将显示图像:
<ImageView
android:id="@+id/image"
android:src="src"
/>
<TextView
android:text="image text"
android:layout_below ="@id/image"
/>
当然,在视图中添加更多选项
一些很好的参考:http://developer.android.com/reference/android/widget/ImageView.html http://developer.android.com/reference/android/widget/ImageView.html
http://developer.android.com/reference/android/widget/TextView.html http://developer.android.com/reference/android/widget/TextView.html
http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)