Hai i developed a application in android,in my application i used a dynamically created spinner(many spinner),the width in 320
problem
when 1 spinner text is like"aaaa",2 spinner text is like "a".the two spinner width is varied.i need the same width in all spinner.how to do?Anybody kindly solve my problem.
Spinner spinner = new Spinner(this);
ArrayAdapter spinnerArrayAdapter = new ArrayAdapter(this,
android.R.layout.simple_spinner_dropdown_item,
spinnerArray);
spinner.setAdapter(spinnerArrayAdapter);
Try to create the spinner in XML layout with the width value and set visibility “GONE”.
When you have to use it, you can retrieve it by using findviewbyid method and then you have to set the visibility at VISIBLE.