在Android的画廊插件删除边界? [英] Remove border in Android Gallery widget?

查看:76
本文介绍了在Android的画廊插件删除边界?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将一去各地的画廊图像去除丑陋的灰色边界?

How would one go about removing the ugly grey boarder around the Gallery images?

推荐答案

排除这一行你ImageAdapter停止装货的preSET:

Exclude this line in your ImageAdapter to stop loading of that preset:

//imageBackground = ta.getResourceId(R.styleable.Gallery1_android_galleryItemBackground, 1);

图像,可能是在此之后的重叠,因此​​进入你的main.xml或任何你正在使用的样式,并添加到您的画廊,对周围填充您的画廊图片,就像一个透明的边框:

Images might be overlapping after this, so go into your main.xml or whatever you are using for styling and add this to your Gallery, for padding around your gallery images, like a transparent border:

android:spacing="10px"

所以,现在的XML的库部分将改为:

So that now the Gallery part of the XML will read:

<Gallery 
android:id="@+id/Gallery01" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content"
android:spacing="10px">
</Gallery>

这篇关于在Android的画廊插件删除边界?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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