Thank you I created an xml which is having one textview as below spinner.xml <?xml version="1.0" encoding="utf-8"?> <TextView android:text="@+id/TextView01" android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android"> </TextView>
while setting adapter for my spinner i did as follows ArrayAdapter roomAdapter = new ArrayAdapter(this, R.layout.spinner, roomsArray); spinner.setAdapter(roomAdapter); But still i am getting the display as the screen size, If i change text width in spinner.xml to some 60px instead of wrap_content The string is cut into two are three rows but the background display is still as the device screen width Any help, Thanks, Karteek On Sep 16, 10:01 am, Shashidhar <shashi.zep...@gmail.com> wrote: > Yes, You can do it. While setting the dropdownviewresource for the adapter > of your spinner, define your own xml layout instead of the android's inbuilt > resource xml. Your xml can simply have a textview with your required layout > parameters. > > -Shashidhar > > On Thu, Sep 16, 2010 at 9:55 AM, Karteek N <kartee...@gmail.com> wrote: > > When we select spinner it shows a display of items which almost the device > > screen size > > > Can we minimize its width or height, I think this question was already > > posted by some one. But i am unable to find solution > > > Thanks, > > Karteek > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > > 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en