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

谈到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性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...