On 30 Kwi, 23:43, Mark Murphy <[email protected]> wrote:
>
> For starters, you don't add any tabs.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books.html

When I add tabs, the app is stopped...
This is my code (from Example Api)

import android.app.Activity;
import android.os.Bundle;
import android.app.TabActivity;
import android.widget.TabHost;
import android.content.Intent;

public class Tabs extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        final TabHost tabHost = getTabHost();

        tabHost.addTab(tabHost.newTabSpec("tab1")
                .setIndicator("list")
                .setContent(new Intent(this, List1.class)));

        tabHost.addTab(tabHost.newTabSpec("tab2")
                .setIndicator("photo list")
                .setContent(new Intent(this, List2.class)));

    }
}

and I have 2 classess List1 and List2
List1 is:
import android.app.Activity;
import android.os.Bundle;

public class List1 extends Activity{
        public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
       // setContentView(R.layout.main);
        }
}

I don't know where is problem.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to