Example usage for android.preference PreferenceFragment getClass

List of usage examples for android.preference PreferenceFragment getClass

Introduction

In this page you can find the example usage for android.preference PreferenceFragment getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:com.justplay1.shoppist.features.settings.SettingsActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.layout_single_fragment);

    initToolbar();//from   w  w  w .  j a  va  2s  . c om
    PreferenceFragment fragment = getFragmentInstance();

    getFragmentManager().beginTransaction().replace(R.id.container, fragment, fragment.getClass().getName())
            .commit();
}