root / src / com / rackspacecloud / android / TabViewActivity.java @ 9548973b
History | View | Annotate | Download (890 Bytes)
1 |
/**
|
---|---|
2 |
*
|
3 |
*/
|
4 |
package com.rackspacecloud.android; |
5 |
|
6 |
import android.app.TabActivity; |
7 |
import android.content.Intent; |
8 |
import android.widget.TabHost; |
9 |
import android.os.Bundle; |
10 |
|
11 |
/**
|
12 |
* @author Mike Mayo - mike.mayo@rackspace.com - twitter.com/greenisus
|
13 |
*
|
14 |
*/
|
15 |
public class TabViewActivity extends TabActivity { |
16 |
|
17 |
@Override
|
18 |
public void onCreate(Bundle savedInstanceState) { |
19 |
super.onCreate(savedInstanceState);
|
20 |
|
21 |
TabHost tabs = getTabHost(); |
22 |
|
23 |
TabHost.TabSpec spec = tabs.newTabSpec("tab1");
|
24 |
spec.setContent(new Intent(this, ListServersActivity.class)); |
25 |
spec.setIndicator("Cloud Servers", getResources().getDrawable(R.drawable.cloudservers_icon));
|
26 |
tabs.addTab(spec); |
27 |
|
28 |
spec = tabs.newTabSpec("tab2");
|
29 |
spec.setContent(new Intent(this, ListContainerActivity.class)); |
30 |
spec.setIndicator("Cloud Files", getResources().getDrawable(R.drawable.cloudfiles));
|
31 |
tabs.addTab(spec); |
32 |
} |
33 |
|
34 |
} |