Gallery with Text: Font styling

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Gallery with Text: Font styling

Postby surtax » Tue Jan 19, 2010 12:38 am

I currently have a Gallery Widget very similar to in the
API examples. It is a gallery widget populated by a simple adaptor of

What I am trying to do is make the selected (the item at the center of
the gallery widget) text and background a certain color and the other
visible items a different color. It should be a simple task, but I am
unable to find a tutorial or the place in which to insert these

Code which will modify the existing to display the
center item as Red for example whereas the other items remain the gray
color would be very helpful.

Many thanks in advance.
Posts: 8
Joined: Fri Jun 12, 2009 7:03 am


Postby nithin.warier » Tue Jan 19, 2010 1:17 pm

You can give the background color, just by giving something like this, android:background="#ff0000"(red) for gallery widget in xml. For changing the color of selected, use OnItemClickListener(), then for the selected view, give the color that you want.
Experienced Developer
Experienced Developer
Posts: 87
Joined: Thu Feb 28, 2008 12:05 pm
Location: Malappuram Kerala India


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests