Tab widget and activity

by ryla...@gmail.com » Thu, 12 Mar 2009 01:24:43 GMT


Sponsored Links
 I am trying to have both a tab widget and another activity running at
the same time. I am trying to start the second activity from the same
oncreate method as the tab widget;

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    mTabHost = getTabHost();

    mTabHost.addTab(mTabHost.newTabSpec("one").setIndicator
("one").setContent(R.id.textview1));
    mTabHost.addTab(mTabHost.newTabSpec("two").setIndicator
("two").setContent(R.id.textview2));
    mTabHost.addTab(mTabHost.newTabSpec("three").setIndicator
("three").setContent(R.id.textview3));

    mTabHost.setCurrentTab(0);

    Intent i = new Intent(Test.this, TestThing.class);

}

This only stops the tab widget from being shown(if i understand
correctly it would need a pause/ interrupt to show the tab activity),
I would however like it to work with these 2 running together.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Porting android to IMX31 Lite kit

Hello,

Has any one ported android to IMX31 Lite kit, please let me know the
steps to port or where can i get the information of porting android to
IMX31 litekit.

I got the linux kernel source from 
http://code.google.com/p/android/downloads/list
it supports IMX31ADS but not IMX31lite kit.

Thanks in advance,

Prashanth

--~--~---------~--~----~------------~-------~--~----~

2. yaffs2 and streams

My understanding is that the Android will be using the yaffs2 file
system.  Is that correct?

If so, I have a question about how it handles failed stream
operations.  I'm writing a small app that can potentially do a lot of
I/O using file streams.  On some environments, I've noticed that under
high CPU situations, the occasional stream operation fails:  for
example, a call to mystream.write(buffer, 10) might fail, or a call to
"mystream << buffer".

I know it fails because mystream.fail() returns true after the call.
However, what I don't know is the extent of the failure.  Did none of
the bytes make it through?  Or two bytes, or nine?

The errno is 0 and so far in my testing, none of the bytes make it
through.  However, I don't know if this is always the case thanks to
yaffs journaling, or whether this is just luck and partial output of
the stream is just rare but possible with my application.

Does anyone know if I can/should rely on the journaling to ensure that
none of the bytes in the failed call makes it through, or if I need to
put in some sort of rollback mechanism in my code to gaurantee this?

--~--~---------~--~----~------------~-------~--~----~

3. Wall Street Journal article today - are things going down the drain for independent developers?

4. Error in creation of new android project

5. How to play a VideoFile from Resourse Folder??

6. Show a (progress) dialog in the onClick event of an alert dialog

7. No display, was: Wall Street Journal article