How can I access items I previously set using AlertDialog.Builder?

private static final CharSequence[] skill_levels = { "Rookie",
"Average", "Expert" };

skillLevelBuilder = new AlertDialog.Builder( this );
skillLevelBuilder.setTitle( "Change Skill Level" );
skillOnClick = new DialogInterface.OnClickListener()
{
  [...]
}
skillLevelBuilder.setItems( skillLevels, skillOnClick );


I need to disable some of the items so they are visible but not selectable.


I am trying (and failing) like this:

AlertDialog skillLevelAlert = skillLevelBuilder.create();
ListView lv = skillLevelAlert.getListView();
View v = (View) lv.getItemAtPosition( 0 );
v.setEnabled( false );
skillLevelAlert.show();

v is always null.  How can I get an item to disable it?



Thanks,

-- 
Greg Donald
http://destiney.com/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to