123456789101112131415161718192021222324252627282930313233343536 |
- package eu.kanade.mangafeed.ui.activity;
- import android.os.Bundle;
- import android.preference.PreferenceFragment;
- import android.support.v7.widget.Toolbar;
- import butterknife.Bind;
- import butterknife.ButterKnife;
- import eu.kanade.mangafeed.R;
- import eu.kanade.mangafeed.ui.activity.base.BaseActivity;
- public class SettingsActivity extends BaseActivity {
- @Bind(R.id.toolbar) Toolbar toolbar;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_preferences);
- ButterKnife.bind(this);
- setupToolbar(toolbar);
- getFragmentManager().beginTransaction().replace(R.id.settings_content,
- new MyPreferenceFragment()).commit();
- }
- public static class MyPreferenceFragment extends PreferenceFragment {
- @Override
- public void onCreate(final Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- addPreferencesFromResource(R.xml.preferences);
- }
- }
- }
|