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 —

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


ActiveRecord callbacks, autosave, before this and that, etc.
ActiveRecord callbacks, autosave, before this and that, etc.

The Ugly Truth On a recent project, we had an ActiveRecord model that declared some relationships and call...

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...

SpringOne 2021

Register Now