I have a problem with text sizes of EditText and Spinner with the default light Holo theme. For some reason, they are not the same by default.
Suppose I have this sample layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="EditText default" />
<EditText
style="@android:style/Widget.Holo.Light.Spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="EditText spinner style" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:entries="@android:array/imProtocols" />
</LinearLayout>
… which results in this:

From the screenshot you can see that:
- The text size in the
Spinner(3) is by default a bit smaller than in theEditText(1). - If I apply
Spinnerstyle to anEditText(2), then it’s font has the same “smaller” size as the Spinner. - The
Spinner-styledEditTextalso doesn’t have any left padding for some reason.
What I want to achieve
I have created a custom date-time-picker component that derives from RelativeLayout and contains two EditTexts. Upon clicking, the first one displays a date-picker dialog and the second one displays a time-picker dialog.
Now, I would like to style these two EditTexts to like like a Spinner, in a similar fashion to ICS Google Calendar, which looks like this:

The second line is an EditText for the Location of the event. I have entered the same date value into it as in the From input, which is some type of View (probably also an EditText) that displays a DatePickerDialog upon click.
As you can see, the text sizes in the From and To inputs are the same as in the location EditText and also the left padding is the same.
How can I achieve a Spinner-like appearance for an EditText while maintaining the same font size and left-padding?
Where (in the android style XML files) can I find what are the actual default values of textSize, padding etc. of various views and widgets (EditText and Spinner in this case)?
Well, since nobody else answered, this is what I have done:
I’ve applied the trial and error method to determine the actual text size and left padding of the EditText and then manually set these parameters:
It’s a dirty solution, but it seems to work even for different text size settings in the system, so for now I’m sticking with it.