如何将Android Tablelayout中的单元格向右对齐

如何将Android Tablelayout中的单元格向右对齐,android,alignment,cell,tablelayout,Android,Alignment,Cell,Tablelayout,我对Android中的表格布局有问题。我想要这样的东西: 但是我没能成功:(我试过了 及 但还是不行,有人有主意吗? 到目前为止,这就是我的xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" an

我对Android中的表格布局有问题。我想要这样的东西:

但是我没能成功:(我试过了

但还是不行,有人有主意吗? 到目前为止,这就是我的xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="de.elpudge.lbp.StartActivityModules">

    <ImageButton
        android:layout_width="25dp"
        android:layout_height="25dp"
        android:id="@+id/buttonStartModulesMore"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:background="@drawable/start_button_more_selector"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:text="@string/modules"
        android:id="@+id/textView2"
        android:layout_alignBottom="@+id/buttonStartModulesMore"
        android:layout_centerHorizontal="true" />

    <ScrollView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/scrollView"
        android:layout_below="@+id/textView2"
        android:layout_alignParentStart="true" >

        <TableRow
            android:layout_width="fill_parent"
            android:layout_height="wrap_content">

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="0.1"
                android:id="@+id/imageView" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:text="Small Text"
                android:layout_weight="0.7"
                android:id="@+id/textView6" />

            <ImageButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/buttonStartModulesPlay"
                android:layout_gravity="right|center_vertical"
                android:background="@drawable/start_button_play_selector"/>

        </TableRow>
    </ScrollView>
</RelativeLayout>


非常感谢!:)

请添加您的xml!A完成:请准备好xml!aa完成:D
android:layout_gravity="right|center_vertical"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="de.elpudge.lbp.StartActivityModules">

    <ImageButton
        android:layout_width="25dp"
        android:layout_height="25dp"
        android:id="@+id/buttonStartModulesMore"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:background="@drawable/start_button_more_selector"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:text="@string/modules"
        android:id="@+id/textView2"
        android:layout_alignBottom="@+id/buttonStartModulesMore"
        android:layout_centerHorizontal="true" />

    <ScrollView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/scrollView"
        android:layout_below="@+id/textView2"
        android:layout_alignParentStart="true" >

        <TableRow
            android:layout_width="fill_parent"
            android:layout_height="wrap_content">

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="0.1"
                android:id="@+id/imageView" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:text="Small Text"
                android:layout_weight="0.7"
                android:id="@+id/textView6" />

            <ImageButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/buttonStartModulesPlay"
                android:layout_gravity="right|center_vertical"
                android:background="@drawable/start_button_play_selector"/>

        </TableRow>
    </ScrollView>
</RelativeLayout>