Android Tidbits 6/23/2011: Tabs and Colors

June 23, 2011 Joe Moore

Pivotal Android Tabs

We have published a simple Android project that illustrates how to use tabs in an Android app: TabActivity, TabHost, TabWidget, and android:divider. Thank you Pivot Ryan, the original author, for taking the time to write and open source this. Check it out, fork it, and enjoy — https://github.com/pivotal/Pivotal-Android-Tabs

Tabs 1

Tabs 2

See Hex’d Colors

IntelliJ trick: in a colors.xml file, place your cursor on a hex value and hold down Shift. You’ll see a large preview of the color.

Hex colors in IntelliJ

Colors and States

(Repost from the 6/22/2011 Standup blog): You can use a selector drawable to set Android text color for the various states (focused, selected, etc.) using a drawable xml file. IntelliJ will complain and say this is invalid syntax but the application will use the file as you would expect. This only seems to work for the android:textColor attribute in TextViews.

About the Author

Biography

More Content by Joe Moore
Previous
Zep Solar Seeks Lead Rails Developer in San Rafael, CA
Zep Solar Seeks Lead Rails Developer in San Rafael, CA

At Pivotal Labs, one of the services we provide our clients is helping them interview and hire. Pivotal Lab...

Next
auto_tagger and alternate tag refs
auto_tagger and alternate tag refs

A recent addition to Jeff Dean's auto_tagger is the ability to use an alternate tag ref type instead of sta...

Enter curious. Exit smarter.

Learn More