Android layout 如何将左侧有两个图像视图的TextView居中?

Android layout 如何将左侧有两个图像视图的TextView居中?,android-layout,Android Layout,我的要求是在并排的两个ImageView的中间和右边显示一个TextView。此外,如果文本太长,它应该省略。你能告诉我是否有任何方法可以实现这一点吗 谢谢。试试这个。如果是你的要求 <RelativeLayout android:layout_width="fill_parent" android:layout_height="100dp" android:layout_alignParentTop="true" android:layout_cente

我的要求是在并排的两个ImageView的中间和右边显示一个TextView。此外,如果文本太长,它应该省略。你能告诉我是否有任何方法可以实现这一点吗


谢谢。

试试这个。如果是你的要求

 <RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="100dp"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="46dp" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_centerVertical="true"
        android:layout_marginLeft="64dp"
        android:src="@drawable/ic_launcher" />

    <ImageView
        android:id="@+id/imageView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:src="@drawable/ic_launcher" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_marginLeft="15dp"
        android:singleLine="true"
        android:ellipsize="end"
        android:layout_toRightOf="@+id/imageView2"
        android:text="Testing testing testing testing" />

</RelativeLayout>


notclear
imageview
then
textview
then
imageview
u想要这样的东西吗不,应该是imageview imageview textview,而textview应该在布局的中心。