Prevent crash

This commit is contained in:
M66B
2020-10-30 10:36:16 +01:00
parent aea6a79019
commit 3c8c9da858
27 changed files with 133697 additions and 229 deletions

View File

@@ -1169,16 +1169,14 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
String name = getArguments().getString("name");
final Context context = getContext();
View view = LayoutInflater.from(context).inflate(R.layout.dialog_sync, null);
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_sync, null);
final TextView tvFolder = view.findViewById(R.id.tvFolder);
final EditText etMonths = view.findViewById(R.id.etMonths);
tvFolder.setText(name);
etMonths.setText(null);
return new AlertDialog.Builder(context)
return new AlertDialog.Builder(getContext())
.setView(view)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override