0

Good Evening Everyone,

I have a gridview of images, but I want them flush against each other (without the border that appears when tapped).

I've set vertical and horizontal spacing to zero along with the padding. However, when tapped, the gridview "tap border" still shows up. How can I expand my images, or remove that so I no longer see it.

If you're still unclear, I can provide screenshots.

Thanks, -Mitchell

enter image description here

Mitchell
  • 929
  • 2
  • 11
  • 34
  • Can you provide the XML or Java code you use to create your `GridView`? – Cat Jul 23 '12 at 04:23
  • Does you have to use a GridView? Could you use a Gallery object instead? i know that the gallery object can do exactly what you want. – pogo2065 Jul 23 '12 at 13:35

2 Answers2

0

Try to use nine-patch bitmap as selector.
Also make sure that bottom and right black lines (nine-patch) cover all sides.
In this case your pictures won't have offsets between each other

demaksee
  • 1,108
  • 11
  • 16
0

I think you should use

public void setSelector (int resID)

and set it to drawable that is fully transpert

the drawable you can define at xml file

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

    <stroke android:width="0px" android:color="@android:color/transparent" />
<padding android:left="0dp" android:top="0dp" android:right="0dp"
    android:bottom="0dp" />
<corners android:radius="0px"/>
</shape>