Back to project page semana-isw2013.
The source code is released under:
Apache License
If you think the Android project semana-isw2013 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 mobi.itson.semanaisw2013app; /*w w w. j a v a2 s .c o m*/ import android.annotation.SuppressLint; import android.app.Activity; import android.os.Bundle; import android.support.v4.app.NavUtils; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.Toast; import com.actionbarsherlock.app.ActionBar; import com.actionbarsherlock.app.SherlockActivity; import com.actionbarsherlock.view.MenuItem; public class ScheduleActivity extends SherlockActivity{ private static final String WEBSITE_SCHEDULE = "https://docs.google.com/file/d/0BzP__TYXk0YsY0xmQUdBM2JHbVU"; private WebView webview; @SuppressLint("SetJavaScriptEnabled") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setUpActionBar(); webview = new WebView(this); webview.getSettings().setJavaScriptEnabled(true); final Activity activity = this; webview.setWebViewClient(new WebViewClient(){ public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { Toast.makeText(activity, description, Toast.LENGTH_SHORT).show(); } }); webview.loadUrl(WEBSITE_SCHEDULE); setContentView(webview); } private void setUpActionBar(){ ActionBar actionBar = getSupportActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); } @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; } return super.onOptionsItemSelected(item); } }