Search in sources :

Example 1 with SettingFragment

use of io.hefuyi.listener.ui.fragment.SettingFragment in project ListenerMusicPlayer by hefuyicoder.

the class SettingActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_settings);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setTitle(R.string.settings);
    PreferenceFragment fragment = new SettingFragment();
    FragmentManager fragmentManager = getFragmentManager();
    fragmentManager.beginTransaction().replace(R.id.fragment_container, fragment).commit();
}
Also used : FragmentManager(android.app.FragmentManager) SettingFragment(io.hefuyi.listener.ui.fragment.SettingFragment) PreferenceFragment(android.preference.PreferenceFragment) Toolbar(android.support.v7.widget.Toolbar)

Aggregations

FragmentManager (android.app.FragmentManager)1 PreferenceFragment (android.preference.PreferenceFragment)1 Toolbar (android.support.v7.widget.Toolbar)1 SettingFragment (io.hefuyi.listener.ui.fragment.SettingFragment)1