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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:31:39+00:00 2026-06-02T08:31:39+00:00

within a linear layout i need to overlay some text views with a transparent

  • 0

within a linear layout i need to overlay some text views with a transparent button which fills the whole layout size (width/height). I tried with match parent layout properties but that doesn’t work. Thank You for your help.

<LinearLayout
                android:id="@+id/layout1"
                android:layout_width="38dp"
                android:layout_height="match_parent"
                android:gravity="bottom"
                android:orientation="vertical" >

                <TextView
                    android:id="@+id/TVBlack"
                    android:layout_width="28dp"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center|bottom"
                    android:background="@color/black"
                    android:text="test"
                    android:textColor="@color/white" />

                <TextView
                    android:id="@+id/TVWhite"
                    android:layout_width="28dp"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center|bottom"
                    android:text="test"
                    android:textColor="@color/black" />

                <Button
                    android:id="@+id/button1"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@null"
                    android:text="Button" />

            </LinearLayout>
  • 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-02T08:31:40+00:00Added an answer on June 2, 2026 at 8:31 am

    What you are trying to do is not possible with a Linear Layout, it will not overlay objects on top of each other, it will just place objects side-by-side in the order they are declared. You need to use a FrameLayout to achieve what you’ve described, see the docs here:

    http://developer.android.com/reference/android/widget/FrameLayout.html

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

Sidebar

Related Questions

I have an activity with a couple of views in a linear layout, one
i have bunch of buttons within linear layout. But there is spaces buttons. I
I have implemented one up button and one down button in my layout.xml which
Why do some views in a linearlayout within a scrollview fill the parent when
Within our company we use a proprietary template engine, which stores its templates in
Within my logic layer I have the need to check permissions for a wide
Within my service I have an mbean which is accessed by my war file.
I am in the process of creating a LinearLayout and within this layout...there will
I have a problem with centering text on buttons in a layout that I
I need a box within a box, with ~33% of empty room at the

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.