Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class PatientDialogFragment extends DialogFragment {
- @Nullable
- @Override
- public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- View root = inflater.inflate(R.layout.dialog_fragment, container, false);
- final RecyclerView recyclerView = (RecyclerView) root.findViewById(R.id.recyclerViewPatientsDialog);
- recyclerView.setLayoutManager(new LinearLayoutManager(this.getActivity()));
- recyclerView.setHasFixedSize(true);
- final PatientsAdapter adapter = new PatientsAdapter();
- recyclerView.setAdapter(adapter);
- AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
- builder.setView(inflater.inflate(R.layout.dialog_fragment, null));
- builder.setTitle("Choose patient");
- builder.setPositiveButton("ok", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- }
- });
- builder.create();
- return root;
- }
- @Override
- public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
- super.onViewCreated(view, savedInstanceState);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement