I want to Display image in gridview with a text written on it at bottom. So I took a button and set background on that and set wallpaper on that. This gives a image with a text over which I may make any work.
The code I use is
Button
android:id="@+id/img"
android:layout_gravity="center"
android:gravity="bottom|center"
android:layout_width="100dp"
android:paddingBottom="4dp"
android:textSize="13dp"
android:layout_height="100dp">
</Button>
Button imageView = (Button) rowView.findViewById(R.id.img);
imageView.setText(web[position]);
imageView.setBackgroundResource(imageId[position]);
And I get the result as the first Image but the problem here is It is tough to read the text on some images
I want the text to be written with its own background as written on second image. So what must I do to achieve this result. Your suggestions are valuable for me. So kindly suggest, Thanks in Advance