android-LinearLayout-如何使文本位于图标的右侧?

android-LinearLayout-如何使文本位于图标的右侧?,第1张

概述谈到Android时,它只是一个新手,只花了几天的时间就可以正常工作,但是即使经过所有搜索,我仍然感到困惑,而且似乎没人知道如何帮助我.到目前为止,我有:http://img263.imageshack.us/i/sellscreen.jpg如何将文本移动到每个图标旁边而不是其下方?希望画廊也不会被移动.这是我的代码:<

谈到Android时,它只是一个新手,只花了几天的时间就可以正常工作,但是即使经过所有搜索,我仍然感到困惑,而且似乎没人知道如何帮助我.到目前为止,我有:

http://img263.imageshack.us/i/sellscreen.jpg

如何将文本移动到每个图标旁边而不是其下方?希望画廊也不会被移动.这是我的代码:

<?xml version="1.0" enCoding="utf-8"?><ScrollVIEw xmlns:androID="http://schemas.androID.com/apk/res/androID"    androID:ID="@+ID/scroller"    androID:layout_wIDth="fill_parent"    androID:layout_height="fill_parent"    androID:fillVIEwport="true" ><linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"    androID:orIEntation="vertical"    androID:layout_wIDth="fill_parent"    androID:layout_height="fill_parent"    >    <gallery xmlns:androID="http://schemas.androID.com/apk/res/androID"    androID:ID="@+ID/gallery"    androID:layout_wIDth="fill_parent"    androID:layout_height="wrap_content"/>    <ImageVIEw      androID:ID="@+ID/test_image"     androID:src="@drawable/icon"     androID:layout_wIDth="wrap_content"     androID:layout_height="wrap_content"/>    <TextVIEw       androID:layout_wIDth="fill_parent"      androID:layout_height="wrap_content"      androID:text="The offcial UK driving theory test application. Over 190 questions."     />    <ImageVIEw      androID:ID="@+ID/test_image"     androID:src="@drawable/icon"     androID:layout_wIDth="wrap_content"     androID:layout_height="wrap_content"/>    <TextVIEw       androID:layout_wIDth="fill_parent"      androID:layout_height="wrap_content"      androID:text="The offcial UK driving theory test application. Over 190 questions."/>    <ImageVIEw      androID:ID="@+ID/test_image"     androID:src="@drawable/icon"     androID:layout_wIDth="wrap_content"     androID:layout_height="wrap_content"/>    <TextVIEw       androID:layout_wIDth="fill_parent"      androID:layout_height="wrap_content"      androID:text="The offcial UK driving theory test application. Over 190 questions."/>    <ImageVIEw      androID:ID="@+ID/test_image"     androID:src="@drawable/icon"     androID:layout_wIDth="wrap_content"     androID:layout_height="wrap_content"/>    <TextVIEw       androID:layout_wIDth="fill_parent"      androID:layout_height="wrap_content"      androID:text="The offcial UK driving theory test application. Over 190 questions."/>    <ImageVIEw      androID:ID="@+ID/test_image"     androID:src="@drawable/icon"     androID:layout_wIDth="wrap_content"     androID:layout_height="wrap_content"     />    <TextVIEw       androID:layout_wIDth="fill_parent"      androID:layout_height="wrap_content"      androID:text="The offcial UK driving theory test application. Over 190 questions."        />    </linearLayout></ScrollVIEw>

由于某些原因,我的代码的上半部分似乎没有显示,但这只是线性布局的开头.
我将永远感激任何能为您提供帮助的人,我已经绞尽脑汁好几天了,却一无所获.真的感到压力了.提前致谢!!

解决方法:

您需要将每个ImageVIEw / TextVIEw对包装在linearlayout中

<linearLayout androID:orIEntation="horizontal"androID:layout_wIDth="fill_parent"androID:layout_height="wrap_content">    <ImageVIEw      androID:ID="@+ID/test_image"     androID:src="@drawable/icon"     androID:layout_wIDth="wrap_content"     androID:layout_height="wrap_content"/>    <TextVIEw       androID:layout_wIDth="fill_parent"      androID:layout_height="wrap_content"      androID:text="The offcial UK driving theory test application. Over 190 questions."     /></linearLayout>

同样很明显,您没有问过任何了解androID的人,因为这很简单.

总结

以上是内存溢出为你收集整理的android-LinearLayout-如何使文本位于图标的右侧?全部内容,希望文章能够帮你解决android-LinearLayout-如何使文本位于图标的右侧?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1083034.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存