Пространство галереи в начале и в конце

У меня возникла следующая проблема: я создал форму с галереей, галерея вместо изображений содержит элементы из одного из моих классов, все внутри каждого элемента галереи отображается идеально. Я удалил пробел между изображениями, используя:

  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
        <Gallery android:id="@+id/galleryid"
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content"
                android:spacing="0dip"
                android:padding="0dip"
                android:layout_weight="1" />

элементы галереи:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
    android:layout_width="75dip" xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="wrap_content" android:orientation="vertical" android:gravity="center_horizontal" android:background="#ffffff"> 

    <TextView android:id="@+id/frame_number" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="-" android:textSize="12dip" android:textColor="#ffffff" android:background="#000000" android:gravity="center" />
    <LinearLayout android:id="@+id/LinearLayout01"
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent" android:orientation="horizontal" android:gravity="center_horizontal">
                <TextView  android:id="@+id/frame_shot1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="-" android:textSize="18dip" android:textColor="#000000" />
                <TextView  android:id="@+id/frame_shot2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="-" android:textSize="18dip" android:textColor="#000000" />
    </LinearLayout> 
    <TextView android:id="@+id/frame_total" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="---" android:textSize="38dip" android:textColor="#000000"/>
</LinearLayout>

buuuuuuuuuuuuuuuuut, у меня проблема, в начале и конце галереи есть пустое пространство без элементов. дело в том, что в моей галерее есть много элементов, которые можно прокручивать по горизонтали, но я хочу избавиться от этих пробелов, поэтому самое первое в самом левом углу галереи - это первый элемент, и самый последний, когда вы прокручиваете справа - правильный элемент.


Edit 08/16 По-прежнему с той же проблемой в проекте, здесь я оставляю изображение именно того, от чего я пытаюсь избавиться, это черное пространство в начало (также находится в конце галереи с другой стороны)

enter image description here

8
задан Ale K. 16 August 2011 в 04:16
поделиться