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 6820035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:22:36+00:00 2026-05-26T21:22:36+00:00

I’ve tried researching about this for many days. I’ve really really no idea how

  • 0

I’ve tried researching about this for many days. I’ve really really no idea how to start on doing a very similar style as below. I know it consists of one button and a edittext. However, i do not know how to begin with. Do anybody have a sample code for similar styled bar?
Androdi search bar style

  • 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-26T21:22:37+00:00Added an answer on May 26, 2026 at 9:22 pm

    The android search bar is a mix of native and custom elements.

    The Layout used by the search bar can be found in the android source code at this path (for the 2.1 version I can on my hard drive):

    frameworks/base/core/res/res/layout/search_bar.xml

    You can found the detail of the layout below:

    <view
        xmlns:android="http://schemas.android.com/apk/res/android"
        class="android.app.SearchDialog$SearchBar"
        android:id="@+id/search_bar"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:focusable="true"
        android:descendantFocusability="afterDescendants">
    
        <!-- Outer layout defines the entire search bar at the top of the screen -->
        <LinearLayout
            android:id="@+id/search_plate"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingLeft="12dip"
            android:paddingRight="12dip"
            android:paddingTop="7dip"
            android:paddingBottom="16dip"
            android:background="@drawable/search_plate_global" >
    
            <!-- This is actually used for the badge icon *or* the badge label (or neither) -->
            <TextView 
                android:id="@+id/search_badge"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="2dip"
                android:drawablePadding="0dip"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="?android:attr/textColorPrimaryInverse" />
    
            <!-- Inner layout contains the app icon, button(s) and EditText -->
    
           <LinearLayout
                android:id="@+id/search_edit_frame"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">
    
                <ImageView
                    android:id="@+id/search_app_icon"
                    android:layout_height="36dip"
                    android:layout_width="36dip"
                    android:layout_marginRight="7dip"
                    android:layout_gravity="center_vertical"
                />
    
                <view class="android.app.SearchDialog$SearchAutoComplete"
                    android:id="@+id/search_src_text"
                    android:background="@drawable/textfield_search"
                    android:layout_height="wrap_content"
                    android:layout_width="0dip"
                    android:layout_weight="1.0"
                    android:paddingLeft="8dip"
                    android:paddingRight="6dip"
                    android:drawablePadding="2dip"
                    android:singleLine="true"
                    android:ellipsize="end"
                    android:inputType="text|textAutoComplete"
                    android:dropDownWidth="fill_parent"
                    android:dropDownHeight="fill_parent"
                    android:dropDownAnchor="@id/search_plate"
                    android:dropDownVerticalOffset="-9dip"
                    android:popupBackground="@android:drawable/search_dropdown_background"
                />
    
                <!-- This button can switch between text and icon "modes" -->
                <Button 
                    android:id="@+id/search_go_btn"
                    android:background="@drawable/btn_search_dialog"
                    android:layout_width="wrap_content"
                    android:layout_height="fill_parent"
                />
    
                <ImageButton
                    android:id="@+id/search_voice_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="fill_parent"
                    android:layout_marginLeft="8dip"
                    android:background="@drawable/btn_search_dialog_voice"
                    android:src="@android:drawable/ic_btn_speak_now"
                />
            </LinearLayout>
        </LinearLayout>
    </view>
    

    All the drawables and styles are also in the source code.

    To make exactly the same thing, you will have to copy the different elements in your own project.

    You may also have to have a look the different classes:

    • SearchDialog.SearchBar
    • SearchDialog.SearchAutoComplete
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
Specifically, suppose I start with the string string =hello \'i am \' me And
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.