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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:22:18+00:00 2026-05-23T00:22:18+00:00

I have an app in android which uses an autocomplete for a query in

  • 0

I have an app in android which uses an autocomplete for a query in the DB….The autocomplete entries are displayed in a drop down list ….

The problem is that the size of the text displayed in this drop down list is very big and don’t know how to make it smaller:

This is a piece of code:

    public View newView(Context context, Cursor cursor, ViewGroup parent){

        Cursor c = getCursor();
        final LinearLayout ret = new LinearLayout(context);

        final LayoutInflater inflater = LayoutInflater.from(context);
        mName = (TextView) inflater.inflate(
                android.R.layout.simple_dropdown_item_1line, parent, false);


        mNumber = (TextView) inflater.inflate(
                android.R.layout.simple_dropdown_item_1line, parent, false);

        ret.setOrientation(LinearLayout.HORIZONTAL);

        LinearLayout horizontal = new LinearLayout(context);
        horizontal.setOrientation(LinearLayout.HORIZONTAL);

        int nameCol = c.getColumnIndex(db.KEY_SURSA);

        String name = c.getString(nameCol);

        String number = c.getString(c.getColumnIndex(db.KEY_DATE));

        mName.setText(name);
        mNumber.setText(number);

        horizontal.addView(mName, new LinearLayout.LayoutParams(
                LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));

        ret.addView(mNumber, new LinearLayout.LayoutParams(
                LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
        ret.addView(horizontal, new LinearLayout.LayoutParams(
                LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
        return ret;

    }

mName and mNumber are the text view used for displaying my DB content….but how I obtain them frm inflating android.R.layout.simple_dropdown_item_1line I don’t know how could I modify the text size…

  • 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-23T00:22:18+00:00Added an answer on May 23, 2026 at 12:22 am

    Maybe this is what you are looking for? This would set the text size to 100dip, you could adjust the number to whatever you are looking for.

    mName.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 100);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a service class in my Android app which uses a timer. The
So I'm writing an Android app which uses a large c++ library. I have
I have an Android App that uses a TabHost layout. Every tab calls the
I have an android app which uses camera. I am using a socket connection
I have an Android app which by preference uses external storage if available to
I have an app in android that in a different thread from the UI(which
I have an android app that listens for json commands over a socket. I
I am working on an Android app that uses the gdata-java-client to download documents
I currently have an app on the market that supports Android 1.5 (SDK level
I am trying to create a simple 3-D app for android that will have

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.