Remove border in Android Gallery widget?
How would one go about removing the ugly grey boarder around the Gallery 开发者_运维百科images?
Exclude this line in your ImageAdapter to stop loading of that preset:
//imageBackground = ta.getResourceId(R.styleable.Gallery1_android_galleryItemBackground, 1);
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"
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>
Another way is setting yourGallery.setUnselectedAlpha(1); The last answer bring me troubles in other things. Excuse me for my english!
精彩评论