Android Open Source - DashBit Prefs Activity






From Project

Back to project page DashBit.

License

The source code is released under:

Apache License

If you think the Android project DashBit 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.jasonphanley.dashbit.app;
// w  ww  .j av a2 s .c  o m
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.view.MenuItem;

public class PrefsActivity extends PreferenceActivity {
    
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        initActionBar();
        
        initPrefs();
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == android.R.id.home) {
            finish();
            return true;
        } else {
            return super.onOptionsItemSelected(item);
        }
    }
    
    private void initActionBar() {
        getActionBar().setDisplayHomeAsUpEnabled(true);
    }
    
    private void initPrefs() {
        getFragmentManager().beginTransaction()
                .replace(android.R.id.content, new PrefsFragment())
                .commit();
    }
    
}




Java Source Code List

com.jasonphanley.dashbit.api.FitbitApi.java
com.jasonphanley.dashbit.api.FitbitClient.java
com.jasonphanley.dashbit.api.FitbitUtil.java
com.jasonphanley.dashbit.app.App.java
com.jasonphanley.dashbit.app.AuthActivity.java
com.jasonphanley.dashbit.app.FitbitExtension.java
com.jasonphanley.dashbit.app.PrefsActivity.java
com.jasonphanley.dashbit.app.PrefsFragment.java
com.jasonphanley.dashbit.model.Activities.java
com.jasonphanley.dashbit.model.Units.java