谈到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-如何使文本位于图标的右侧?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)