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. USB Keyboard and mouse configuration help needed in android

Hi,

I am running the latest Android 2.6.27 kernel on my own device.  I
don't have the touchscreen working yet so I figured I would try
plugging in a USB keyboard and mouse.

Well, they work - sort of.

The USB keyboard allows me to hit enter to navigate from the main menu
to the application menu.
The USB mouse left button seems to perform the same operation.
The "volume-up" and "volume-down" keys make a ringer-volume menu pop
up and adjust the volume up and down.
The alphabet letters on the keyboard are printed on the screen in a
bar at the botttom.
If I unplug the USB keyboard the menu changes to the "dialer" icon on
the main menu, I can then plug in the keyboard again and hit enter to
launch the dialer icon.

Beyond that, I can't navigate on the screen!  I do get key events
printed from evdebug with the proper keycode, but android doesn't see
to use them.  The arrow keys do not do anything.

My question: what log or debug flags can I turn on to figure out what
is going on in Android?
Where in the code are these keys handled so I can figure out why
certain keys are ignored?
Is there some configuration I need to do?  I haven't done anything
with power management at all.  I suspect something may be wrong there
and/or the build I did does something differently with these keys.

All I did was get the code from the repo:
Then:
. /build/envsetup
lunch 1
make

I copied the resulting system directory from the out directory to my
phone and modified init.rc.
Do I need to build or configure something differently to get USB
keyboard and mouse recognizing all the keys from the keyboard?

Thanks,
 Scott
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. x86- what to provide instead of /dev/block/sdb2 when running in Virtual Box?

You may be able to reference these posts:
Create the installed image directly from the source:

3. x86- what to provide instead of /dev/block/sdb2 when running in Virtual Box?

4. Where can I put some media files(image or video) into emulator or real device

5. Activity and Services

6. Questions on ramdisk, userdata, and system img files

7. How to prevent the default Web Page Not Available screen to show on Webview if my website is down?