5,605,766 Members 48,341 Now Online
XDA Developers Android and Mobile Development Forum

textview above spinner

Tip us?
 
krikor1
Old
#1  
Member - OP
Thanks Meter 0
Posts: 44
Join Date: Aug 2013
Default textview above spinner

i worked it in relativelayout..then i did in linearlayout

all same result

textvie above spinner.. the textview is a bit more onto the left then the spinner..so design not looking that nice.

<TextView
android:layout_marginLeft="8dip"
android:id="@+id/selectStatement"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:text="@string/select_choice" />

<Spinner
android:id="@+id/dropDownList"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

I solved it adding marginleft="8dip"
but dont think its best solution... why does spinner take a left padding while drawn?
 
EatHeat
Old
(Last edited by EatHeat; 28th December 2013 at 11:34 AM.)
#2  
EatHeat's Avatar
Recognized Developer
Thanks Meter 1317
Posts: 902
Join Date: Jan 2013
Location: Calcutta
Use RelativeLayout and align it to a certain position and then add required padding. Add this to the Spinner:
Code:
android:layout_alignParentLeft="true"
android:layout_below="@id/selectStatement"
<!-- If required -->
android:layout_marginLeft="xxdp
[3.0+]Crius.
Customize your clock.


[2.2+]SnowBowl HD.
Enjoy the vacations!


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes