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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:22:09+00:00 2026-05-24T20:22:09+00:00

android is seeming to chop off my textviews for no reason. The XML which

  • 0

android is seeming to chop off my textviews for no reason.

The XML which surrounds the area is this:

<HorizontalScrollView
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:background="@android:color/background_dark"
    android:layout_width="fill_parent">
        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:id="@+id/suggestions">
        </LinearLayout>
</HorizontalScrollView>

And I’m programmatically adding the TextViews as follows:

LinearLayout suggestions = (LinearLayout)findViewById(R.id.suggestions);
suggestions.setVisibility(View.VISIBLE);
suggestions.removeAllViews();
for(String completion : completions){
    TextView show = new TextView(DailyboothBoothView.this);
    show.setTag(completion + " ");
    show.setText("@" + completion);
    show.setPadding(5, 5, 5, 5);
    show.setOnClickListener(new OnClickListener(){
        @Override
        public void onClick(View v) {
        // Some code here   
        }
    });
    show.setHeight(show.getLineHeight() + 10);
    show.setTextColor(Color.parseColor("#cc6600"));
    suggestions.addView(show);
}
  • 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-24T20:22:10+00:00Added an answer on May 24, 2026 at 8:22 pm

    Let the view do the measuring and remove that show.setHeight(show.getLineHeight() + 10)
    . It looks like TextView has some kind of internal extra padding before the first line of text which you do not take into account.

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

Sidebar

Related Questions

Possible Duplicate: NoClassDefFoundError - Eclipse and Android I'm seeing this question is getting asked
I have an android application which (over the network) communicates with a desktop server
The suggested way of implementing menus in Android is to use XML to define
In XML you can set a TextView to have a android:drawableTop however, in the
I am developing an in app billing application for Android In this sample ,
I'm seeing this message This rating option has been disabled by the Android Market
In Android I am seeing code like this: public class Now extends Activity implements
I read this http://developer.android.com/resources/tutorials/notepad/index.html and now try to create my own simple example. For
I am beginning Android app development and I would like to know which device
I am trying to compile an Android project which was built by some on

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.