use of androidx.appcompat.app.AppCompatActivity in project fdroidclient by f-droid.
the class SettingsView method onDetachedFromWindow.
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
AppCompatActivity activity = (AppCompatActivity) getContext();
Fragment existingFragment = activity.getSupportFragmentManager().findFragmentByTag("preferences-fragment");
if (existingFragment == null) {
return;
}
if (currentTransaction == null) {
currentTransaction = activity.getSupportFragmentManager().beginTransaction();
}
currentTransaction.remove(existingFragment);
currentTransaction.commitAllowingStateLoss();
currentTransaction = null;
activity.getSupportFragmentManager().executePendingTransactions();
}
use of androidx.appcompat.app.AppCompatActivity 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();
}
use of androidx.appcompat.app.AppCompatActivity in project Taskbar by farmerbb.
the class AppearanceFragment method onActivityCreated.
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
AppCompatActivity activity = (AppCompatActivity) getActivity();
activity.setTitle(R.string.tb_pref_header_appearance);
ActionBar actionBar = activity.getSupportActionBar();
if (actionBar != null)
actionBar.setDisplayHomeAsUpEnabled(true);
}
use of androidx.appcompat.app.AppCompatActivity in project Taskbar by farmerbb.
the class FreeformModeFragment method onActivityCreated.
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
AppCompatActivity activity = (AppCompatActivity) getActivity();
activity.setTitle(R.string.tb_pref_header_freeform);
ActionBar actionBar = activity.getSupportActionBar();
if (actionBar != null)
actionBar.setDisplayHomeAsUpEnabled(true);
}
use of androidx.appcompat.app.AppCompatActivity in project Taskbar by farmerbb.
the class ManageAppDataFragment method onActivityCreated.
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
AppCompatActivity activity = (AppCompatActivity) getActivity();
activity.setTitle(R.string.tb_manage_app_data);
ActionBar actionBar = activity.getSupportActionBar();
if (actionBar != null)
actionBar.setDisplayHomeAsUpEnabled(true);
}
Aggregations