Android 如何仅为第一个和最后一个缩略图添加边距或填充

Android 如何仅为第一个和最后一个缩略图添加边距或填充,android,Android,我有一个带有文本视图的图像列表。下面是该视图的xml文件。但是当我把图像添加到第一张被剪掉的图像和手机的左屏幕时。同样的事情也发生在最后一张图片上,右边的部分被剪掉了。我试着增加边距。但它适用于所有图像。然后中间的图像有更多的间隙 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" a

我有一个带有文本视图的图像列表。下面是该视图的xml文件。但是当我把图像添加到第一张被剪掉的图像和手机的左屏幕时。同样的事情也发生在最后一张图片上,右边的部分被剪掉了。我试着增加边距。但它适用于所有图像。然后中间的图像有更多的间隙

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="wrap_content" 
    android:layout_height="fill_parent"
    android:gravity="center_vertical" 
    android:layout_gravity="center_vertical"
    android:paddingLeft="3dp"
     android:paddingRight="3dp"
      android:paddingTop="6dp"
      android:layout_marginLeft="0dp"
     android:background="#FFFFFFFF">  

    <ImageView 
        android:id="@+id/image" 
        android:layout_width="55dp" 
        android:layout_height="95dp" 

        android:scaleType="centerCrop" />  


    <TextView 
        android:id="@+id/title" 
        android:background="#90202020"      
        android:padding="1dp"
        android:layout_alignParentBottom="true"
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:textColor="#FFFFFFFF" 
        android:layout_centerHorizontal="true"
        android:textSize="10sp"

        android:text="1" >  

    </TextView>



</RelativeLayout>


下面是左侧屏幕截图。

您可以在父视图(包含图像列表的视图)上添加一些边距/填充。

您可以将您想要的图像和现在的显示方式放在一起吗?我添加了左侧屏幕截图。在第一个图像和手机屏幕之间,几乎没有间隙。我需要增加间隙。如何解决其他问题?