如何去除画廊图片周围丑陋的灰色边框?
最佳答案
在您的 ImageAdapter 中排除这一行以停止加载该预设:
//imageBackground = ta.getResourceId(R.styleable.Gallery1_android_galleryItemBackground, 1);
在此之后图像可能会重叠,因此请进入您的 main.xml 或您用于样式设置的任何内容,并将其添加到您的图库中,以便在您的图库图像周围填充,如透明边框:
android:spacing="10px"
现在 XML 的 Gallery 部分将显示为:
<Gallery
android:id="@+id/Gallery01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:spacing="10px">
</Gallery>
关于android - 删除 Android Gallery 小部件中的边框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5344532/