android - How to show Contact Alphabet list horizontally? -
I am trying to apply a contact list and its alphabet bar. I have searched a lot, but Also the example I have found, all the alphabetical lists are stacked, but I need alphabetical horizontal list above the contact grid view.
I have found some examples of using the list view but I need it on touch scroll, so I do not think listview is a good idea.
Edit: Please see what I am doing like this link
A
b
c
But I need ABC .. so much.
Any link or example is quite commendable
thanks
It is impossible, a ListView is only vertical.
You can not make it horizontal However, you can apply a horizontal scroll view as a horizontal list view.
But scrolling of the horizontal scroll view is hard to control because it does not have setOnScrollListener.
& lt; HorizontalScrollView android: id = "@ + ID / horizontal scroll view" Android: layout_width = "match_parent" Android: layout_height = "match_parent" & gt; & Lt; LinearLayout Android: layout_width = "match_parent" Android: layout_height = "match_parent" & gt; & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "match_parent" Android: text = "Click here before scroll list" Android: onClick = "Action" /> & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "my button 1" /> & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "my button 2" /> & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "my button 3" /> & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "my button 4" /> & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "my button 5" /> & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: Text = "My Button 6" /> & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "my button 7" /> & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "my button 8" /> & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "my button 9" /> & Lt; / LinearLayout & gt; & Lt; / HorizontalScrollView & gt;
Comments
Post a Comment