I'm trying to get my EditText field to not be as tall but to no avail. Is there some way to get the text field (the white part around the text) to take up less vertical space? paddingTop and paddingBottom and maxHeight and height all appear to be ignored. Do I need to replace it with my own drawable background for it to do what I want (is that even an option)?
[EDIT] So, for example in the code below I'm interested in the field being 10dip tall.
<EditText
android:id="@+id/frame0"
android:width="100dip"
android:singleLine="true"
android:inputType="phone"
android:maxLength="4"
android:textStyle="bold"
android:paddingLeft="10dip"
android:paddingRight="10dip"
android:textSize="8dip"
android:height="10dip"
android:maxHeight="10dip"
android:paddingTop="0dip"
android:paddingBottom="0dip"
android:gravity="center"
android:layout_gravity="center"
/>
[EDIT 2]
It would appear that a partial solution is to just scrap 开发者_StackOverflow中文版the style of the background and use one's own...
style="?android:attr/textViewStyle"
android:background="@null"
android:textColor="@null"
Basically you get a clickable TextView that you can edit. But this doesn't strike me as the most elegant solution, so, I'm still hoping someone will chime in with my simply overlooking something obvious.
Well... I gave it some time and no one offered anything better than the (relatively terrible) answer I provided in the question edit... Guess I'll accept that as the answer (grudgingly).
精彩评论