Simplifications

This commit is contained in:
M66B
2020-10-30 09:51:59 +01:00
parent 8472d379d3
commit aea6a79019
25 changed files with 229 additions and 160 deletions

View File

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