Back to project page Dumbledroid.
The source code is released under:
Copyright (c) 2013, Leocadio Tin? All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ...
If you think the Android project Dumbledroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package io.leocad.dumbledoreexample.activities; //from w w w. java 2 s . co m import io.leocad.dumbledoreexample.R; import android.annotation.SuppressLint; import android.app.Activity; import android.os.Build; import android.os.Bundle; import android.support.v4.app.NavUtils; import android.view.MenuItem; import android.webkit.WebView; public class AboutActivity extends Activity { @SuppressLint("NewApi") @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.about); if (Build.VERSION.SDK_INT >= 11) { // Show the Up button in the action bar. getActionBar().setDisplayHomeAsUpEnabled(true); } loadContent(); } private void loadContent() { WebView wv = (WebView) findViewById(R.id.wv); wv.loadUrl("file:///android_asset/about.html"); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: // This ID represents the Home or Up button. In the case of this // activity, the Up button is shown. Use NavUtils to allow users // to navigate up one level in the application structure. For // more details, see the Navigation pattern on Android Design: // // http://developer.android.com/design/patterns/navigation.html#up-vs-back // NavUtils.navigateUpFromSameTask(this); return true; case R.id.menu_about: //startActivity( new intent) return true; } return super.onOptionsItemSelected(item); } }