Update QuickActionsWidget.java

This commit is contained in:
vshcherb 2020-05-14 15:59:22 +02:00 committed by GitHub
parent 377a892cf2
commit 96db2c1aee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -250,15 +250,15 @@ public class QuickActionsWidget extends LinearLayout {
view.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
FragmentManager fm = ((AppCompatActivity) getContext()).getSupportFragmentManager();
if (action instanceof NewAction) {
fm.beginTransaction()
.add(R.id.fragmentContainer, new QuickActionListFragment(), QuickActionListFragment.TAG)
.addToBackStack(QuickActionListFragment.TAG).commitAllowingStateLoss();
} else {
CreateEditActionDialog dialog = CreateEditActionDialog.newInstance(action.id);
dialog.show(fm, AddQuickActionDialog.TAG);
}
FragmentManager fm = ((AppCompatActivity) getContext()).getSupportFragmentManager();
if (action instanceof NewAction) {
fm.beginTransaction()
.add(R.id.fragmentContainer, new QuickActionListFragment(), QuickActionListFragment.TAG)
.addToBackStack(QuickActionListFragment.TAG).commitAllowingStateLoss();
} else {
CreateEditActionDialog dialog = CreateEditActionDialog.newInstance(action.id);
dialog.show(fm, AddQuickActionDialog.TAG);
}
return true;
}
});