Search in sources :

Example 1 with PreferencesFragment

use of org.fdroid.fdroid.views.PreferencesFragment in project fdroidclient by f-droid.

the class SettingsView method onAttachedToWindow.

@Override
protected void onAttachedToWindow() {
    super.onAttachedToWindow();
    AppCompatActivity activity = (AppCompatActivity) getContext();
    if (currentTransaction == null) {
        currentTransaction = activity.getSupportFragmentManager().beginTransaction();
    }
    currentTransaction.replace(getId(), new PreferencesFragment(), "preferences-fragment");
    currentTransaction.commitAllowingStateLoss();
    currentTransaction = null;
    activity.getSupportFragmentManager().executePendingTransactions();
}
Also used : PreferencesFragment(org.fdroid.fdroid.views.PreferencesFragment) AppCompatActivity(androidx.appcompat.app.AppCompatActivity)

Aggregations

AppCompatActivity (androidx.appcompat.app.AppCompatActivity)1 PreferencesFragment (org.fdroid.fdroid.views.PreferencesFragment)1