Hi, I'm trying to create a form like dialog to accept a few EditText
and a spinner. Somehow I can display the spinner but then I start
implementing the array and setOnItemSelectedListener it crash. Did I
do anything wrong?
--- code---
LayoutInflater inflater = (LayoutInflater)
getSystemService(Context.LAYOUT_INFLATER_SERVICE);
final View layout =
inflater.inflate(R.layout.generate_pwd, (ViewGroup)
findViewById(R.id.generate_pwd));
final AlertDialog.Builder builder = new
AlertDialog.Builder(this);
Spinner spin=(Spinner)findViewById(R.id.spinner);
spin.setOnItemSelectedListener(this);
ArrayAdapter<String> pwdTypeArray=new
ArrayAdapter<String>(this, android.R.layout.simple_spinner_item,
R.array.password_type);
pwdTypeArray.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spin.setAdapter(pwdTypeArray);
builder.setView(layout);
// Now configure the AlertDialog
builder.setTitle(R.string.generate_pwd_title);
--
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