画廊在开头和结尾的空间 [英] Gallery space at beginning and end

查看:165
本文介绍了画廊在开头和结尾的空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了下面的问题,我有一个画廊做了一个表格,画廊,而不是包含图像包含来自我的一个班,一切画廊显示完美的每一个项目里面的物品。我删除图像之间的空间利用:

I got the following problem , i made a form with a gallery, the gallery instead of containing images contains items from one of my classes, everything inside each item of the gallery displays perfectly. I removed the space between images using:

  <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,我有一个问题,有一个在没有项目库的开头和结尾部分空白。事情是,我的画廊上有许多项目,ü实际上可以水平滚动,但我想摆脱那些空间等最左边画廊的第一件事情是第一个项目,而最后当u滚动到非常正确的是正确的项目。

buuuuuuuuuuuuuuuuut , i got a problem, there is some blank space at the beginning and end of the gallery with no items. the thing is that my gallery has many items on it that u can actually scroll horizontally, but i wanna get rid of those spaces so the very first thing on the very left of the gallery is the first item, and the very last when u scroll to the very right is the right item.

编辑08/16还是同样的问题早在项目,在这里我留下什么是什么,我试图摆脱的是在一开始的黑色空间(也就是在年底的图像画廊在另一侧)

Edit 08/16 Still with the same problem back in the project, here i leave an image of exactly what is what I'm trying to get rid of that is the black space at the beginning (also is at the end of the gallery at the other side)

推荐答案

尝试:

int position=1;

void android.widget.AbsSpinner.setSelection(int position)

这篇关于画廊在开头和结尾的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆