Timothy,

Here onCreate is declared as protected method, not public  in 1.0_r2. 
For instance, here is how onCreate is implemented by ActivityGroup 
(which is a parent class for TabActivity):

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Bundle states = savedInstanceState != null
                ? (Bundle) savedInstanceState.getBundle(STATES_KEY) : null;
        mLocalActivityManager.dispatchCreate(states);
    }

Sergey

Timothy DeWees wrote:
> Hello,
>
> I'm trying to use a TabActivity class to tab-ify my application.  I've
> found some walkthroughs online but I think they are a little dated.
>
> I want to use Activities inside the tab and just re-use the activities
> I wrote in the current version.
>
> It's telling me that there is no onCreate method so I'm hoping someone
> can help me correct the code or give me a substitute.
>
> Here is what my code looks like:
>
> package [...]
>
> import android.app.TabActivity;
> import android.content.Intent;
> import android.widget.TabHost;
>
> public class MyCollection extends TabActivity {
>
>         @Override
>         public void onCreate(Bundle savedInstanceState) {
>                super.onCreate(savedInstanceState);
>                TabHost host=getTabHost();
>
>                host.addTab(host.newTabSpec("one")
>                                .setIndicator("Test1")
>                                .setContent(new Intent(this,
> test.class)));
>                host.addTab(host.newTabSpec("two")
>                      .setIndicator("Test2")
>                      .setContent(new Intent(this, test.class)));
>                host.addTab(host.newTabSpec("three")
>                               .setIndicator("Test3")
>                                .setContent(new Intent(this,
> test.class)));
>         }
> }
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to