Back to project page Simplest-Flashlight-App.
The source code is released under:
Apache License
If you think the Android project Simplest-Flashlight-App 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 com.andrewq.simpleflashlight; /*from w w w . j av a 2s . c o m*/ import android.os.Bundle; import android.preference.PreferenceActivity; import android.support.v4.app.NavUtils; import android.util.Log; import android.view.MenuItem; public class Settings extends PreferenceActivity { @SuppressWarnings("deprecation") @Override protected void onCreate(Bundle savedInstanceState) { Log.d("Settings.java", "onCreate() was called"); super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.settings); getActionBar().setDisplayHomeAsUpEnabled(true); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: NavUtils.navigateUpFromSameTask(this); return true; default: return super.onOptionsItemSelected(item); } } }