Android Open Source - ShareManager Settings Activity






From Project

Back to project page ShareManager.

License

The source code is released under:

Copyright (c) 2013, Nelspike All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Red...

If you think the Android project ShareManager 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 share.manager.stock;
// w w  w.  j  a va 2 s .co  m
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.support.v4.app.NavUtils;
import android.view.MenuItem;

public class SettingsActivity extends PreferenceActivity {

  private PreferencesFragment prefFrag;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    prefFrag = new PreferencesFragment();
    getFragmentManager().beginTransaction()
        .replace(android.R.id.content, prefFrag).commit();
    
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) getActionBar()
    .setDisplayHomeAsUpEnabled(true);
  }

  public static class PreferencesFragment extends PreferenceFragment {
    @Override
    public void onCreate(final Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      addPreferencesFromResource(R.xml.preferences);
    }
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
      case android.R.id.home:
        NavUtils.navigateUpFromSameTask(this);
        return true;
      default:
        return super.onOptionsItemSelected(item);
    }
  }

}




Java Source Code List

share.manager.adapters.CompanyAdapter.java
share.manager.adapters.DialogAdapter.java
share.manager.adapters.MainPagerAdapter.java
share.manager.adapters.SharesAdapter.java
share.manager.connection.ConnectionRunnable.java
share.manager.connection.ConnectionThread.java
share.manager.fragments.MineFragment.java
share.manager.fragments.PortfolioFragment.java
share.manager.fragments.SharesFragment.java
share.manager.listeners.ShareTabListener.java
share.manager.listeners.SwipeListener.java
share.manager.stock.CompanyActivity.java
share.manager.stock.MainActivity.java
share.manager.stock.ResultsActivity.java
share.manager.stock.SettingsActivity.java
share.manager.stock.ShareManager.java
share.manager.utils.CompanyGraphicsBuilder.java
share.manager.utils.FileHandler.java
share.manager.utils.GraphType.java
share.manager.utils.RESTFunction.java
share.manager.utils.ShareUtils.java
share.manager.utils.SharesGraphicsBuilder.java