Tabs by Intent

by r45k » Sat, 14 Mar 2009 02:11:45 GMT

Sponsored Links
 I can't seem to run the code below without crashing. I followed the
tuts online about tabs exactly and got it working until i changed one
line of code to set a tab's content to a separate class. NOTE: it ran
fine before i added the line that made the content a new class...

public class HelloTabWidget extends TabActivity {
     public void onCreate(Bundle savedInstanceState) {

        final TabHost mTabHost = getTabHost();
Intent(this, Profile.class)));



I don't really quite understand whats going wrong when this is
basically code for code from the API demo...
I'm also assuming my error has to do with this line of code:

....setContent(new Intent(this, Profile.class)));.....

here is the profile class:

public class Profile extends ListActivity {

    public void onCreate(Bundle savedInstanceState) {

        // Use a custom layout file

and it's main2 xml:

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="" ;


Other Threads

1. SMS Header

I've been looking around and have been wondering is there any way to
modify the SMS header before sending it out?


2. Which UI approach is better?

I'm navigating through a 3-level hierarchy of names to get to a
document view page. I've set up tabs for the 3 levels. The tabs are
left, middle, and right where the right tab is the lowest level of the
hierarchy. Each tab has a list of 10 to 20 RadioButtons with the
names. This all works great and is very efficient and intuitive.

One note is that there may be 1000 documents available (from an online
source) but the average user will only be viewing a handful regularly.
So I store the choices for each of the 3 tabs. This way a user can
quickly navigate to his favorite without having to negotiate the
entire hierarchy each time.

My question comes when the user is on the right tab. At this point
they have navigated through to the document they want and I'm
wondering what is the best way to initiate the document view page.
Remember that most of the navigation happens on the right tab in the
small set of documents the user regularly visits, with only occasional
visits to the other tabs. So making the right tab efficient is good.

My current approach is to add a LongClickListener to the buttons of
the right tab. Then a press-and-hold kicks off the document view. This
certainly minimizes the number of objects on the screen and the number
of separate clicks required to get to the document but I question
whether new users will know that a long press is expected. I guess I
could put up some Toast if the user doesn't do anything for 5 seconds
but that still seems clunky.

Another approach is to add a Button at the top of the right tab
RadioButtons. This has the merit of being dead obvious but it's a less
efficient use of screen space and also an extra click for an
experienced user.

What do you all think? Maybe a third way?


3. BroadcastReceiver not working for Car Dock

4. strange LVL calback errors

5. wpa_cli not found

6. Open Max Test App documents

7. Buffering problem while reading an h264 video (using HTTP protocol)