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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:57:35+00:00 2026-05-25T23:57:35+00:00

The Android TextView clips off my text subscripts (see image below) even when I

  • 0

The Android TextView clips off my text subscripts (see image below) even when I use android:layout_height="wrap_content" for the TextView.
Is there a fix/work-around for this?

alt text

P/S: Superscripts work fine

Note: padding doesn’t work.

  • I tried even adding a padding of 50dip but it did not help.
  • I can use an absolute height such as 50dip but that messes everything up when I need text to wrap around.

Sample Code:

mtTextView.setText(Html.fromHtml("HC0<sub>3</sub>"));

  • 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-25T23:57:35+00:00Added an answer on May 25, 2026 at 11:57 pm

    This solution worked for me.

    Superscripted text is usually made smaller when the browser renders it, that doesn’t seem to happen here so you can replicate that (and solve this problem) by doing this:

    someTextView.setText(Html.fromHtml("Some text<sup><small>1</small></sup>"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in android xml file, i often see two different format: <TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/DrawableResources
I have the following TextView in my XML layout file:- <TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/autolink_test
<TextView android:id = @+id/txtBabbleListTitle android:layout_width = wrap_content android:layout_height = wrap_content android:textColor = #000000 android:text
I have the following TextView defined: <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/txtCredits" android:autoLink="web" android:id="@+id/infoTxtCredits" android:layout_centerInParent="true" android:linksClickable="true"/>
I have an android loyout like this: <ScrollView android:layout_width=fill_parent android:layout_height=fill_parent android:id=@+id/scrollview> <TextView android:id=@+id/text android:layout_width=wrap_content
I did like below in xml <TableRow> <TextView android:id=@+id/address1 android:layout_width=fill_parent android:layout_height=wrap_content android:gravity=left android:maxLines=4 android:singleLine=false
here is a line in layout file <TextView android:id=@+id/username android:layout_height=wrap_content android:layout_width=wrap_content android:text=@string/username android:textAppearance=?android:attr/textAppearanceMedium >
I have the following TextView: <TextView android:id=@+id/theFooBar android:autoLink=web android:layout_height=wrap_content android:layout_width=fill_parent android:text=@string/fooBar android:textColor=@android:color/black android:textSize=20sp/> And
i have created a textview with underline text like this <TextView android:id=@+id/label android:layout_width=wrap_content android:layout_height=wrap_content
What is the design advantage to do this <TextView android:layout_width=105px android:layout_height=wrap_content android:text=@string/hello /> and

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.