Closed ghost closed 9 years ago
I have this code:
ListDialogFragment.SimpleListDialogBuilder simpleListDialogBuilder = new ListDialogFragment.SimpleListDialogBuilder(getActivity().getApplicationContext(), getFragmentManager()); simpleListDialogBuilder .setTitle("titleString") .setItems((R.array.array_items)) .setTargetFragment(this, item.getId()) .show();
I tried with .setTargetFragment(this, 5) but on onListItemSelected(String s, int i) of IListDialogListener i always is 0.
however (other code) in onPositiveButtonClicked(int i) of ISimpleDialogListener i does have the correct value.
Hi, setTargetFragment() method should not be used for identifying which item was pressed. Please use IListDialogListener for that.
I have this code:
I tried with .setTargetFragment(this, 5) but on onListItemSelected(String s, int i) of IListDialogListener i always is 0.
however (other code) in onPositiveButtonClicked(int i) of ISimpleDialogListener i does have the correct value.