Android AlertDialog MultiChoiceItems not showing custom view -


Friends,

I'm unable to set custom view for AlertDialog MultiChoiceItems.

  AlertDialog.builder Builder = New AlertDialog.Builder (getContext ()); Builder.setMultiChoiceItems (items.toArray (new CharSequence [items.size ()]), selected, this); ListAdapter Adapter = New ArrayAdapter & LT; String & gt; (GetContext (), R.layout.spinner, item) {see public view getView (integer position, view convertView, ViewGroup parent) {last LayoutInflater inflater = getImageContext (getInterface) getSystemService (context.layOUT_INFLATER_SERVICE); If (convertView == tap) {convertView = inflater.inflate (R.layout.spinner, tap); } TextView Title = (TextView) ConvertviewFindViewID (RIDAAAA); Title.setText ("yes"); TextView subtitle = (TextView) convertView.findViewById (R.id.bbb); Subtitle.setText ("KaBooom"); Return Convertview; }}; Builder.setAdapter (adapter, empty); Builder.setOnCancelListener (this); Builder.show ();  

I have read a similar question here, although I was not able to reproduce it. MultiChoiceItems changes the default view and the adapter is ignored.

  & lt; Relative layout xmlns: android = "http://schemas.android.com/apk/res/android" Android: layout_width = "match_perrent" Android: layout_height = "match_parent" & gt; Android: Android: Android: Android: Android: Android: Android: Android: Android: Android: Android: Android: Android: layout_width = "match_perrent": text = "AAA" /> & lt; TextView Android: Android: oneLine = "true" android: layout_width = "match_parent" Android: layout_height = "wrap_content" android: ellipsize = "marquee" Android: textAlignment = "inherit" Android: text = "BBB" /> & Lt; / RelativeLayout & gt;  

Maybe you use

needed

Comments