Delete border in Android Gallery widgets?

How can I remove an ugly gray frame around gallery images?

+4
source share
2 answers

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

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

Images may overlap after this, so go to your main.xml file or whatever you use to style it and add this to your gallery to fill your gallery images like a transparent frame:

 android:spacing="10px" 

So, now part of the XML Gallery will look like this:

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

Another way is to configure yourGallery.setUnselectedAlpha (1); The last answer brings me trouble in other things. Sorry for my english!

+2
source

Source: https://habr.com/ru/post/1344181/


All Articles