Help with the tab tutorial

Hey I am new to android development and most programing in general other then 2 semesters of C++. But my question revolves around this tutorial I was able to follow how to write the previous ones but when it comes to this one I am having trouble. My question is, what does it mean when it says to create a separate activity for each tab and how do I go about that?


You simply need to create two or more activities via the normal means: create a class that extends Activity, declare them in the manifest, ect. Then create your tab activity that extends the TabActivity. From there this code snip highlights the high points (note that I assume two activities exist called ActivityA and ActivityB)...

public class MyTabActivity extends TabActivity {

    public void onCreate(Bundle savedInstanceState) {

        final Resources res     = getResources(); 
        final TabHost   tabHost = getTabHost();  

        TabHost.TabSpec spec;  
        Intent          intent;  

        /* Add tab A */
        intent = new Intent().setClass(this, ActivityA.class);
        spec   = tabHost.newTabSpec("tab_a")
                        .setIndicator("Tab A", res.getDrawable(R.drawable.ic_tab_a))

        /* Add tab B */
        intent = new Intent().setClass(this, ActivityB.class);
        spec   = tabHost.newTabSpec("tab_b")
                        .setIndicator("Tab B", res.getDrawable(R.drawable.ic_tab_b))

Need Your Help

Why is RSAParameters Modulus not equal product of P and Q?

c# .net cryptography rsa

The values of P and Q do not match value of the Modulus of the .Net RSAParameters.

Adding column with default value to large table

sql sql-server performance

I have a table with 40mil records. I need to add a new INT NOT NULL column to that table, with default value = 0