Aaron Decker
Aaron Decker

Reputation: 558

Remove border in Android Gallery widget?

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

Upvotes: 4

Views: 3292

Answers (2)

SolArabehety
SolArabehety

Reputation: 8616

Another way is setting yourGallery.setUnselectedAlpha(1); The last answer bring me troubles in other things. Excuse me for my english!

Upvotes: 3

alyx
alyx

Reputation: 2733

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>

Upvotes: 8

Related Questions