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

Thanks!

-- 



Other Threads

1. Unable to send AT cmd to gsm modem to disconnect gprs on eclair

Hello,


I use the virtual channel daemon and the multiplex mode to create 2
channels to connect to GSM modem. One is for AT command and the other
one is for gprs connection.
The moment the APN is set, it will try to switch to data mode on the
GPRS channel by sending some related AT commands and start the PPP
daemon with it. Then the ppp net device is created and i am able to
send and receive data by java socket over this device.

But when I try to disconnect the gprs connection by changing APN, I
got a problem that I can't send any at command to GPRS channel and
always get writing error code 11 (EAGAIN).

Actually most of my code is based on freerunner froyo.

My GSM modem is SIM900A.

The gprs channel is opened by


                fd_gprs = open ("/dev/pts/1", O_RDWR | O_NONBLOCK);
                if ( fd_gprs >= 0 ) {
                    struct termios  ios;
                    tcgetattr(fd_gprs, &ios);
                    ios.c_lflag = 0;
                    cfsetispeed(&ios, B115200);
                    cfsetospeed(&ios, B115200);
                    tcsetattr(fd_gprs, TCSANOW, &ios );
                }

The pppd is started with the options:

/dev/pts/1
user
password
unit 1
noauth
nodetach
default-asyncmap
ipcp-accept-local
ipcp-accept-remote
usepeerdns
defaultroute



The disconnecting AT command I sent is


int at_deactivate_modem(struct ATChannels *ATch)
{
    ...
    ioctl(ATch->s_fd, TIOCSBRK, 0);
    ioctl(ATch->s_fd, TIOCSBRK, 0);
    ioctl(ATch->s_fd, TIOCSBRK, 0);

    err = at_send_command_full_nolock (ATch, "+++AT", NO_RESULT,
                                       NULL, NULL, CLOSE_TIMEOUT_MSEC,
                                       NULL);

    /* some stacks start with verbose off */
    err = at_send_command_full_nolock (ATch, "ATH", NO_RESULT,
                                       NULL, NULL, CLOSE_TIMEOUT_MSEC,
                                       NULL);

    err = at_send_command_full_nolock (ATch, "AT+CGACT=0", NO_RESULT,
                                       NULL, NULL, CLOSE_TIMEOUT_MSEC,
                                       NULL);

    err = at_send_command_full_nolock (ATch, "AT+CGATT=0", NO_RESULT,
                                       NULL, NULL, CLOSE_TIMEOUT_MSEC,
                                       NULL);
    ...
}

The err is always -1 and the errno is set to 11 accordingly.

Could anyone has any ideas on this issue?



Thanks,

Jack

-- 

2. Log every action/event to an external file

Hi there,

I've been searching around the web some easy and straight forward
solution to LOG everything that a user does while using my application
for a user testing and I can't find a simple solution. I don't want to
see it on the logcat but keep it ..let's say on a TXT file or
something similar..

I'd like to store events like pressing buttons but also store the
location and orientation of the device while using my application as
well as the time between this actions.

Is there any good approach for this? Was I clear or can I try and
explain in another way?

I'd appreciate some help or guidance on what to explore. Thank you
very much in advance.

P

-- 

3. RSSI values

4. marketbilling project closed?

5. Renderscript vs WebGL

6. bitmap returning null

7. [OOT] Saingan Xoom tapi tanpa Flash ?