Are you adding your button to your view? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware
On Thu, Jun 21, 2012 at 5:35 AM, vani reddy <[email protected]>wrote: > > Hi friends, > > How to open spinner on click of a button. > > I tried > Spinner spinner =new Spinner(this); > ArrayAdapter<String> packSizeAdapter = new ArrayAdapter<String>( > activity, R.layout.spinner_item, productUOMS); > > > packSizeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); > spinner .setAdapter(packSizeAdapter); > > > Button btn=new Button(this); > btn.setOnClickListener(new View.OnClickListener() { > @Override > public void onClick(View v) { > spinner .performClick(); > } > }); > > It is not working at all ,Is there anyting i am missing..Please reply > > -- > Regards, > Vani Reddy > > -- > 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 -- 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

