Android Open Source - temaki Settings Fragment






From Project

Back to project page temaki.

License

The source code is released under:

Apache License

If you think the Android project temaki 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 com.jmartin.temaki.settings;
/*  www  . j  a  va  2 s.c o m*/
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceFragment;

import com.jmartin.temaki.R;
import com.jmartin.temaki.model.Constants;

/**
 * Author: Jeff Martin, 2013
 */
public class SettingsFragment extends PreferenceFragment {

    private final String TEMAKI_GOOGLE_PLAY_URL = "https://play.google.com/store/apps/details?id=com.jmartin.temaki";
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.preferences);

        Preference ratePref = findPreference(Constants.KEY_PREF_RATE_TEMAKI);
        ratePref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
            @Override
            public boolean onPreferenceClick(Preference preference) {
                Intent intent = new Intent(Intent.ACTION_VIEW);
                intent.setData(Uri.parse(TEMAKI_GOOGLE_PLAY_URL));
                startActivity(intent);

                return false;
            }
        });
    }
}




Java Source Code List

com.jmartin.temaki.FocusActivity.java
com.jmartin.temaki.MainDrawerActivity.java
com.jmartin.temaki.MainListsFragment.java
com.jmartin.temaki.adapter.DrawerListAdapter.java
com.jmartin.temaki.adapter.ListItemsAdapter.java
com.jmartin.temaki.dialog.DeleteConfirmationDialog.java
com.jmartin.temaki.dialog.GenericInputDialog.java
com.jmartin.temaki.model.Constants.java
com.jmartin.temaki.model.TemakiItem.java
com.jmartin.temaki.settings.InformationDialogPreference.java
com.jmartin.temaki.settings.SettingsActivity.java
com.jmartin.temaki.settings.SettingsFragment.java