2011-11-05 18:51:20 +00:00
|
|
|
package com.dougkeen.bart;
|
|
|
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.webkit.WebView;
|
|
|
|
|
2012-07-22 14:57:17 +00:00
|
|
|
import com.actionbarsherlock.app.SherlockActivity;
|
|
|
|
import com.actionbarsherlock.view.Menu;
|
|
|
|
import com.actionbarsherlock.view.MenuInflater;
|
|
|
|
import com.actionbarsherlock.view.MenuItem;
|
2012-07-15 17:00:39 +00:00
|
|
|
|
2012-07-22 14:57:17 +00:00
|
|
|
public class ViewMapActivity extends SherlockActivity {
|
2011-11-05 18:51:20 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
|
|
|
|
WebView webview = new WebView(this);
|
|
|
|
setContentView(webview);
|
|
|
|
|
|
|
|
webview.getSettings().setBuiltInZoomControls(true);
|
|
|
|
webview.getSettings().setSupportZoom(true);
|
|
|
|
|
|
|
|
webview.loadUrl("file:///android_res/drawable/map.png");
|
2012-07-18 17:31:06 +00:00
|
|
|
|
2012-07-22 14:57:17 +00:00
|
|
|
getSupportActionBar().setHomeButtonEnabled(true);
|
|
|
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
2011-11-05 18:51:20 +00:00
|
|
|
}
|
2012-07-15 17:00:39 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean onCreateOptionsMenu(Menu menu) {
|
2012-07-22 14:57:17 +00:00
|
|
|
MenuInflater inflater = getSupportMenuInflater();
|
2012-07-15 17:00:39 +00:00
|
|
|
inflater.inflate(R.menu.system_map_menu, menu);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2012-07-18 17:31:06 +00:00
|
|
|
@Override
|
|
|
|
public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
|
if (item.getItemId() == android.R.id.home) {
|
2012-07-22 14:57:17 +00:00
|
|
|
finish();
|
2012-07-18 17:31:06 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return super.onOptionsItemSelected(item);
|
|
|
|
}
|
|
|
|
|
2011-11-05 18:51:20 +00:00
|
|
|
}
|