Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8970921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:49:38+00:00 2026-06-15T17:49:38+00:00

I have a problem with text sizes of EditText and Spinner with the default

  • 0

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:

  1. The text size in the Spinner (3) is by default a bit smaller than in the EditText (1).
  2. If I apply Spinner style to an EditText (2), then it’s font has the same “smaller” size as the Spinner.
  3. The Spinner-styled EditText also 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)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:49:40+00:00Added an answer on June 15, 2026 at 5:49 pm

    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:

    <style name="PickerEditText" parent="@android:style/Widget.Holo.Light.Spinner">
        <item name="android:paddingLeft">12dp</item>
        <item name="android:textAppearance">?android:attr/textAppearanceMediumInverse</item>
    </style>
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with getting text from EditText field to insert it in
I have problem with text drawing around Circle. I found great sample in C#
I have problem with TinyMCE editor. I have form with few text fields and
people. I have slight problem with GD2 text on image. I have everything working
I want to place UItextField in UITableViewCell but I have problem. Text field don't
I have a simple problem while putting text in multiple table! please have a
I have a litle problem with my text encoding, when user filed textarea field
I have a problem to get the values and text of the MultiSelectList to
I have a problem while pasting my contents (or text) generated by Java code
I have a problem with sax parser and encoded text. I try to parse

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.