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

  • Home
  • SEARCH
  • 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 6037791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:07:32+00:00 2026-05-23T06:07:32+00:00

Here are sample pictures of two EditText fields I’ve added in an Action Bar:

  • 0

Here are sample pictures of two EditText fields I’ve added in an Action Bar:
This is from the Graphical View

[This is from the Graphical Layout tool in Eclipse]
enter image description here

[This is what it looks like in my emulator (2.1 WVGA854)

My question is, how can I make the EditText look a bit closer to the Graphical Layout? Or is this a function of the emulation? On my device, which has a custom rom, the EditText is square but looks similar to the Graphical Layout, which is what I want.

I’ve tried setting the textAppearance to "@android:attr/textAppearanceSmall". This does help in that it changes the size of the text within the EditText to be viewable, but it does not affect the size of the EditText itself.

Here’s the XML for my EditText:

<EditText
android:maxLines="1"
android:scrollHorizontally="true"
android:textAppearance="@android:attr/textAppearanceSmall"
android:layout_marginTop="5dip"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />

I could post the full XML, but essentially this EditText is enclosed (along with the search icon ImageView) in a RelativeLayout that is within another RelativeLayout.

Thanks for any help!

EDIT
By request, here is the full XML for the top search bar:

<RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    <ImageButton
        android:id="@+id/IBSearchOverlayMic"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:background="@drawable/aslctr_search_overlay_blackbutton"
        android:src="@drawable/search_overlay_ic_microphone" />
    <ImageView
        android:id="@+id/IVSearchOverlayDivider1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toLeftOf="@id/IBSearchOverlayMic"
        android:src="@drawable/search_overlay_division" />
    <ImageButton
        android:id="@+id/IBSearchOverlaySearch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toLeftOf="@id/IVSearchOverlayDivider1"
        android:background="@drawable/aslctr_search_overlay_blackbutton"
        android:src="@drawable/search_overlay_ic_searchwhite" />
    <RelativeLayout
        android:id="@+id/RLSearchOverlaySearch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@id/IBSearchOverlaySearch"
        android:layout_alignBottom="@id/IBSearchOverlaySearch"
        android:layout_alignParentLeft="true"
        android:layout_toLeftOf="@id/IBSearchOverlaySearch"
        android:layout_centerVertical="true"
        android:background="@drawable/search_overlay_searchbg">
        <EditText
            android:id="@+id/ETSearchOverlaySearch"
            android:maxLines="1"
            android:scrollHorizontally="true"
            android:textAppearance="@android:attr/textAppearanceSmall"
            android:layout_marginTop="5dip"
            android:layout_marginLeft="5dip"
            android:layout_marginRight="5dip"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignRight="@id/ETSearchOverlaySearch"
            android:layout_centerVertical="true"
            android:layout_marginRight="10dip"
            android:clickable="false"
            android:focusable="false"
            android:src="@drawable/search_actionbar_ic_searchcream" />
    </RelativeLayout>
</RelativeLayout>
  • 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-05-23T06:07:33+00:00Added an answer on May 23, 2026 at 6:07 am

    I determined the problem. The issue was that the EditText was inside the RelativeLayout…I think that messed with the padding, or perhaps the EditText’s layout_height=”wrap_content” meant that it extended vertically. Here’s the reworked XML:

        <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">
        <ImageButton
            android:id="@+id/IBSearchOverlayMic"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:background="@drawable/aslctr_search_overlay_blackbutton"
            android:src="@drawable/search_overlay_ic_microphone" />
        <ImageView
            android:id="@+id/IVSearchOverlayDivider1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@id/IBSearchOverlayMic"
            android:src="@drawable/search_overlay_division" />
        <ImageButton
            android:id="@+id/IBSearchOverlaySearch"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@id/IVSearchOverlayDivider1"
            android:background="@drawable/aslctr_search_overlay_blackbutton"
            android:src="@drawable/search_overlay_ic_searchwhite" />
        <ImageView
            android:id="@+id/IVSearchBackground"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@id/IBSearchOverlaySearch"
            android:layout_alignBottom="@id/IBSearchOverlaySearch"
            android:layout_alignParentLeft="true"
            android:layout_toLeftOf="@id/IBSearchOverlaySearch"
            android:layout_centerVertical="true"
            android:background="@drawable/search_overlay_searchbg" />
        <EditText
            android:id="@+id/ETSearchOverlaySearch"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@id/IBSearchOverlaySearch"
            android:layout_alignBottom="@id/IBSearchOverlaySearch"
            android:layout_alignParentLeft="true"
            android:layout_toLeftOf="@id/IBSearchOverlaySearch"
            android:layout_marginTop="5dip"
            android:layout_marginLeft="5dip"
            android:layout_marginRight="5dip"
            android:layout_marginBottom="0dip"
            android:paddingBottom="0dip"
            android:maxLines="1"
            android:scrollHorizontally="true" />
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@id/IBSearchOverlaySearch"
            android:layout_alignTop="@id/IBSearchOverlaySearch"
            android:layout_alignBottom="@id/IBSearchOverlaySearch"
            android:layout_centerVertical="true"
            android:layout_marginRight="15dip"
            android:clickable="false"
            android:focusable="false"
            android:src="@drawable/search_actionbar_ic_searchcream" />
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the sample code: class TestAO { int[] x; public TestAO () { this.x
When I email myself sample mhtml files (e.g. from here ) images display fine
I asked similar questions here And here This is a sample Type: public class
Here is sample data <table class=sparql border=1> <tr> <th>abstract</th></tr> <tr> <td> Cologne is Germany&#39;s
here the sample case.. i want to display banner randomly by percentage based on
Data: Here is sample table(TableA) data ID StartTime EndTime 1 2012-03-22 06:00:00.000 2012-03-22 06:30:00.000
Here's an sample code, where only the string object is released. NSString *nameOfFile =
Here's the sample code: public static void col (int n) { if (n %
here is the sample: http://jsfiddle.net/Zg55k/ How can I change css background image and color
Here is a sample fiddle: http://jsfiddle.net/K2zyU/4/ The problem I am experiencing is that the

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.