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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:02:45+00:00 2026-06-13T00:02:45+00:00

I have a SearchView inside a LinearLayout and I’m trying to set a different

  • 0

I have a SearchView inside a LinearLayout and I’m trying to set a different TextSize for it (the SearchView) but when setting android:textSize="60sp" for example, nothing happens.

This is my code:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:padding="2dp">
<SearchView
        android:id="@+id/searchView"
        android:layout_width="350dp"
        android:textSize="60sp"
        android:layout_height="80dp"
        android:layout_marginTop="15dp"/>
<ListView
        android:id="@+id/search_results"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/>

Does anyone know how to modify the TextSize of the control?

  • 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-13T00:02:46+00:00Added an answer on June 13, 2026 at 12:02 am

    You could do these using code

    SearchView searchView = new SearchView(context);
    LinearLayout linearLayout1 = (LinearLayout) searchView.getChildAt(0);
    LinearLayout linearLayout2 = (LinearLayout) linearLayout1.getChildAt(2);
    LinearLayout linearLayout3 = (LinearLayout) linearLayout2.getChildAt(1);
    AutoCompleteTextView autoComplete = (AutoCompleteTextView) linearLayout3.getChildAt(0);
    autoComplete.setTextSize(60);
    

    Here is another solution

    SearchView searchView = new SearchView(context);
    AutoCompleteTextView search_text = (AutoCompleteTextView) searchView.findViewById(searchView.getContext().getResources().getIdentifier("android:id/search_src_text", null, null));
    search_text.setTextColor(Color.WHITE);
    search_text.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.text_small));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SeachView inside of a Fragment in an Android 3.1 application currently
I have found a tutorial on this website: http://jduff.github.com/2010/03/01/building-a-searchview-with-uisearchbar-and-uitableview/ ...but I am stuck here:
Have a painfully simple blog Post creator, and I'm trying to check if the
I have a SearchView in my action-bar. When the user searches, I invoke my
Hello Android developers, I've got a problem with the Android SearchView widget. What I'm
I have following ViewModel containing NumberOfAdults fields. public class SearchView { public int NumberOfAdults
I have following sample application, where i am trying to implement paging functionality for
I have an ActionBar implemented as well as a SearchView widget in my app.
I have a GridView that uses an adapter to set ImageViews and when I
Background Developing for Android 3.0, I have a HostActivity that is the superclass of

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.