root / src / com / rackspacecloud / android / TabViewActivity.java @ 038ac9a4
History | View | Annotate | Download (892 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",
|
26 |
getResources().getDrawable(R.drawable.cloudservers_icon)); |
27 |
tabs.addTab(spec); |
28 |
|
29 |
spec = tabs.newTabSpec("tab2");
|
30 |
spec.setContent(new Intent(this, ListContainerActivity.class)); |
31 |
spec.setIndicator("Cloud Files",
|
32 |
getResources().getDrawable(R.drawable.cloudfiles)); |
33 |
tabs.addTab(spec); |
34 |
} |
35 |
|
36 |
} |