I have a gallery with the TextView to achieve the segment controller on the image below. I can achieve it by the ApiDemo’s Gallery Example but I am lagging on the look and feel of the gallery.
I want to do the backgrounds, Selected/deselected and selected item won’t be cone to the center of the screen.
Any Idea or Articles are most Thankful.
image http://www.freeimagehosting.net/uploads/cce47da969.png
I have tried to get using 2 ways. that are:
Gallery Viewhorizontal ScrollView
The ouput getting is in the below image:
image http://www.freeimagehosting.net/uploads/b4c1be5924.png
I have Problem on Both to get the proper output.
In Gallery View,
- can not Change Background of Selected
Item.and make it us rounded corner. - Selected Item comes to the center horizontal of the Screen Automatically.
In horizontal View,
- More Complicated when the
textView‘s number is large. - Can not find a way similar to On Click Item. if i have use switch case. the previous problem comes again.
place this in drawables text_selector.xml
round.xml
round_selected.xml
And here is the textview to inflate
Get the style too. should be placed inside res/valus/styles.xml