Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: "News and Weather" app tabs

Tags:

android

tabs

does anyone know how to build that kind of tabs that the "News and Weather" app uses?

see here http://img51.imageshack.us/img51/8788/tabsd.png

This means a tab area that can be scrolled to the left & right. Changing the tabs is also possible by scrolling the listview to the left / right.

like image 887
nr1 Avatar asked Dec 19 '10 15:12

nr1


People also ask

How do I get my weather widget back on my Android?

For that, long-press on your Home Screen, and tap on 'Widgets'. In the Widgets popup screen that appears, scroll down and tap on 'Google'. You should now see the two new weather widgets available.

Does Google have a weather widget for Android?

The Weather widget is already on your Home screen by default. It's easy to customize the widgets you have, but you can't remove all widgets.


1 Answers

That component up there is actually a HorizontalScrollView, with buttons inside. Use it like a LinearLayout and throw in the buttons. You'll have to manually handle the selected/unselected states of the buttons/tabs though.

like image 63
zrgiu Avatar answered Oct 13 '22 19:10

zrgiu