Skip to content

Instantly share code, notes, and snippets.

@mgroves
Created February 17, 2011 01:28
Show Gist options
  • Select an option

  • Save mgroves/830737 to your computer and use it in GitHub Desktop.

Select an option

Save mgroves/830737 to your computer and use it in GitHub Desktop.
private bool customPref_PreferenceClick(Preference preference)
{
IEnumerable<char>[] stockItemsDisplay = _stockItemsConfig.OrderBy(i => i.StockDataItem).Select(i => i.StockDataItem.GetStringValue()).ToArray();
bool[] allitemschecked = _stockItemsConfig.OrderBy(i => i.StockDataItem).Select(i => i.IsChecked).ToArray();
var dialog = new AlertDialog.Builder(this);
dialog.SetMultiChoiceItems(stockItemsDisplay, allitemschecked, clickCallback);
dialog.SetTitle("Select columns");
dialog.SetPositiveButton("Save", saveCallback);
dialog.Create().Show();
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment