Set the width of the drop-down list in the xml file of the counter using the tag
Android: dropDownWidth = "@ DIMEN / desired_width"
Explanation:
mDropDownWidth = pa.getLayoutDimension(R.styleable.Spinner_dropDownWidth,
ViewGroup.LayoutParams.WRAP_CONTENT);
this field is used for the width of the drop-down list when initializing the counter element in the Spinner class
for programmatically changing counter cutting width above api level 16, use
mSpinner.setDropDownWidth(size_in_pixel);
source
share