I need to create text field which takes 70% of layout's width (in linear layout). I use this code:
<EditText
android:id="@+id/phone"
android:layout_width="fill_parent"
android:layout_weight=".7"
android:layout_height="wrap_content"
android:inputType="phone" >
The problem is that in such case height also takes 70% of layout's height - but I don't need to change it, just want it to be "wrap_content". Is there any good solution?
UPD: Would it be a good solution if I create a new horizontal-orientated linear layout and place my text field inside it? Or maybe something more elegant?
UPD(2): I want it to look like below, but without using marginLeft and marginRgiht, which would give different percentage on a different screen resolution