public CustomHolder(View row, int position, IconSetPreference pref) { text = (TextView)row.FindViewById(Resource.Id.image_list_view_row_text_view); text.Text = pref.IconSets[position].DisplayName; rButton = (RadioButton)row.FindViewById(Resource.Id.image_list_view_row_radio_button); rButton.Id = position; rButton.Clickable = false; rButton.Checked = (pref.selectedEntry == position); try { Drawable dr = pref.IconSets[position].GetIcon(row.Context); var bitmap = ((BitmapDrawable)dr).Bitmap; Drawable d = new BitmapDrawable(row.Resources, Bitmap.CreateScaledBitmap(bitmap, 64, 64, true)); text.SetCompoundDrawablesWithIntrinsicBounds(d, null, null, null); text.Text = (" " + text.Text); } catch (Exception) { } }
public IconListPreferenceScreenAdapter(IconSetPreference pref, Context context) { _pref = pref; }