How to change label, size of child-tab(tabspec) (of tabhost)

by Huynh Ngoc Bang » Fri, 20 May 2011 09:34:00 GMT

Sponsored Links
 I create tabhost with 4 tabspec.

I would like to change label (setIndicator), size of tab  when tab
change from this  tab to another.
How can I do.?



Other Threads

1. How to retrieve paths to multiple SD cards (internal & external)

Hello all,

I ran into a seemingly simple issue to which I cannot find an answer.
The application I am working on needs to read/write data from/to the
SD card. All the resourcess are located in a folder rigth on the root
of the sd card. To obtain the absolute path to my resources directory,
I wrote something like this:

static final String RES_PATH =
Environment.getExternalStorageDirectory() + File.separator +

which results into something like:


This works just fine for most devices. However, there is the Samsung
Galaxy S which has 2 SD cards, one internal, and one external. Using
the code above, I get the path to the internal SD card. The path to
the external card is "/sdcard/sd/" (where I belive "sd" is just the
mount point).

Is there any API that I don't find which returns a list of paths to
multiple SD cards (if available). Or is there any other way to scan
both cards for the existence of my resources folder without hardcoding
it myself. Note that changing the location of the resources dir is not
an option.

Thank you all advance ! Cheers!


2. Should I use "synchronized" for a boolean variable


I use a boolean variable "flag" both in main and child thread. This
"flag" is used to notify child thread to exit. I only use simple
operation, e.g., "flag=false", "if (flag) {}". As I know, in java,
"get and set a boolean variable" is atomic. So "synchronized" is not
needed for variable "flag", declaring "flag" as "volatile" is enough.

Is this still true in Android?

Jason He


3. landscape View problem

4. ScrollView Problem

5. Draw Image on view

6. Best phone for OpenGL game dev

7. Getting An Image from XML