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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:10:07+00:00 2026-05-24T05:10:07+00:00

I have a progress bar and a text view inside of a frame layout.

  • 0

I have a progress bar and a text view inside of a frame layout. The text overlaps the progress bar.

The text view is twice the height of the progress bar (due to the length of the text) and i’d like the progress bar’s height to auto-fit this.

I tried doing this by setting the progress bar to match_parent, and for the parent to wrap_content but the progress bar does not increase in height.

The XML is like so:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
> 

<ProgressBar  
    android:layout_width="match_parent"  
    style="?android:attr/progressBarStyleHorizontal"  
    android:layout_height="fill_parent"
    android:layout_gravity="center_horizontal|center_vertical"
/> 

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="30sp"
    android:text="Big long text here................................"    
    android:layout_gravity="center_horizontal|center_vertical"
/>

</FrameLayout>
  • 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-24T05:10:08+00:00Added an answer on May 24, 2026 at 5:10 am

    Use a RelativeLayout and align the boundaries using layout_align.

     <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:focusable="false">
            <TextView
                android:id="@+id/textview"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="30sp"
                android:text="Big long text here................................"
                android:layout_gravity="center_horizontal|center_vertical" />
            <ProgressBar
                style="?android:attr/progressBarStyleHorizontal"
                android:layout_height="fill_parent"
                android:layout_gravity="center_horizontal|center_vertical"
                android:layout_alignTop="@id/textview"
                android:layout_alignLeft="@id/textview"
                android:layout_alignBottom="@id/textview" />
        </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I have text in the background of a jQuery UI progress bar? You
I need to have a progress bar that should have a text that indicates
I have a progress bar to show the status of the program loading songs
I have a progress bar which inherits from JSlider to provide highlighting functionality. Highlights
i have used progress bar in my application..my application is working fine but the
I am using C# and Windows Forms. I have a normal progress bar working
I have a form with a progress bar and a cancel button which is
All Gmail users should have already noticed that file upload progress bar has been
I have a multi-step BackgroundWorker process. I use a marquee progress bar because several
Again I have a question regarding this plugin: http://t.wits.sg/2008/06/20/jquery-progress-bar-11/ What I want to achieve

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.