Android Open Source - AndroidFortunes Settings Activity






From Project

Back to project page AndroidFortunes.

License

The source code is released under:

Apache License

If you think the Android project AndroidFortunes listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.codechimp.androidfortunes;
//  w  w w. j  a  v a  2  s .  c  om
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.support.v4.app.NavUtils;
import android.view.MenuItem;

import java.util.List;

public class SettingsActivity extends PreferenceActivity {

    @Override
    protected boolean isValidFragment(String fragmentName) {
        return GeneralUserPreferencesFragment.class.getName().equals(fragmentName);
    }

    @Override
    protected void onStop() {
        super.onStop();
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        getActionBar().setHomeButtonEnabled(true);
        getActionBar().setDisplayHomeAsUpEnabled(true);
    }

    @Override
    public void onBuildHeaders(List<Header> target) {
        loadHeadersFromResource(R.xml.preference_headers, target);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {

            case android.R.id.home:
                // app icon in action bar clicked; go home
                NavUtils.navigateUpFromSameTask(this);
                return true;

            default:
                return super.onOptionsItemSelected(item);
        }
    }
}




Java Source Code List

org.codechimp.androidfortunes.AlarmHelper.java
org.codechimp.androidfortunes.AlarmReceiver.java
org.codechimp.androidfortunes.CloudyFortunesApiInterface.java
org.codechimp.androidfortunes.CloudyFortunesClient.java
org.codechimp.androidfortunes.GeneralUserPreferencesFragment.java
org.codechimp.androidfortunes.MainActivity.java
org.codechimp.androidfortunes.MobileListenerService.java
org.codechimp.androidfortunes.NotifyHelper.java
org.codechimp.androidfortunes.OnBootReceiver.java
org.codechimp.androidfortunes.Quote.java
org.codechimp.androidfortunes.SettingsActivity.java
org.codechimp.androidfortunes.WearActivity.java
org.codechimp.androidfortunes.WearListenerService.java
org.codechimp.util.TimePreference.java
org.codechimp.util.WakeLock.java