Permalink
Browse files

Display tabs nicer

Now middle tab displays the schedule on the web
  • Loading branch information...
1 parent 28bc3eb commit ed755f5f0b7a8ae825d1a45581e07db6f35d883a @axelson axelson committed Dec 8, 2011
@@ -1,25 +1,19 @@
package org.hicapacity.techhui;
-import android.app.ListActivity;
+import android.app.Activity;
import android.os.Bundle;
-import android.view.View;
-import android.widget.ArrayAdapter;
-import android.widget.ListView;
-import android.widget.Toast;
+import android.webkit.WebView;
-public class CommunityActivity extends ListActivity {
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- String[] values = new String[] { "Android", "iPhone", "WindowsMobile", "Blackberry",
- "WebOS", "Ubuntu", "Windows7", "Max OS X", "Linux", "OS/2" };
- ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
- android.R.layout.simple_list_item_1, values);
- setListAdapter(adapter);
- }
+public class CommunityActivity extends Activity {
+ WebView mWebView;
+
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.webview);
- @Override
- protected void onListItemClick(ListView l, View v, int position, long id) {
- String item = (String) getListAdapter().getItem(position);
- Toast.makeText(this, item + " selected", Toast.LENGTH_LONG).show();
+ mWebView = (WebView) findViewById(R.id.webview);
+ System.out.println("webview is: " + mWebView);
+ mWebView.getSettings().setJavaScriptEnabled(true);
+ mWebView.loadUrl("http://www.techhui.com");
}
}
@@ -18,6 +18,6 @@ public void onCreate(Bundle savedInstanceState) {
mWebView = (WebView) findViewById(R.id.webview);
System.out.println("webview is: " + mWebView);
mWebView.getSettings().setJavaScriptEnabled(true);
- mWebView.loadUrl("http://www.techhui.com");
+ mWebView.loadUrl("http://www.techhui.com/page/2011-techhui-conference-schedule");
}
}
@@ -28,12 +28,12 @@ public void onCreate(Bundle savedInstanceState) {
tabHost.addTab(spec);
// Do the same for the other tabs
- intent = new Intent().setClass(this, CommunityActivity.class);
- spec = tabHost.newTabSpec("albums")
- .setIndicator("Albums", res.getDrawable(R.drawable.ic_tab_conference)).setContent(intent);
+ intent = new Intent().setClass(this, SongsActivity.class);
+ spec = tabHost.newTabSpec("web_schedule")
+ .setIndicator("Web Schedule", res.getDrawable(R.drawable.ic_tab_conference)).setContent(intent);
tabHost.addTab(spec);
- intent = new Intent().setClass(this, SongsActivity.class);
+ intent = new Intent().setClass(this, CommunityActivity.class);
spec = tabHost.newTabSpec("community")
.setIndicator("Community", res.getDrawable(R.drawable.ic_tab_community)).setContent(intent);
tabHost.addTab(spec);

0 comments on commit ed755f5

Please sign in to comment.