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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:02:56+00:00 2026-05-26T04:02:56+00:00

As my code below shows, I’ve two ImageView that I would like to overlap

  • 0

As my code below shows, I’ve two ImageView that I would like to overlap but the bigger is systematically put below the smaller one, both is android:layout_alignParentTop set “true”, I thought that would lead to an overlapping but Android keeps dislaying them one below the other.

<RelativeLayout android:id="@+id/RelativeLayout1"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:layout_gravity="center_vertical|center_horizontal"
        android:gravity="center_horizontal|center_vertical">
        <ImageView android:id="@+id/homeStars" android:src="@drawable/background" 
            android:layout_height="wrap_content" android:layout_width="fill_parent" android:scaleType="centerInside" 
            android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:layout_alignParentTop="true"  
            />
        <ImageView android:id="@+id/homeLogo" android:src="@drawable/logo"
            android:layout_height="wrap_content" android:layout_width="220dip"
            android:layout_alignParentTop="true" android:layout_centerHorizontal="true"
            android:paddingTop="2dip" />
</RelativeLayout>

Nota 1 : I do not want the first one to be set as a background of the relative view.
Nota 2 : I should add that this Relative Layout is put inside a ScrollView.

  • 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-26T04:02:56+00:00Added an answer on May 26, 2026 at 4:02 am
    <RelativeLayout
        android:id="@+id/RelativeLayout1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
    
        <ImageView
            android:id="@+id/homeStars"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:scaleType="centerInside"
            android:src="@drawable/background" />
    
        <ImageView
            android:id="@+id/homeLogo"
            android:layout_width="220dip"
            android:layout_height="wrap_content"
            android:paddingTop="2dip"
            android:src="@drawable/logo" />
    
    </RelativeLayout>
    

    I removed all of you’re different layout_* tags and it works fine. Naturally all children will overlap each other by positioning themselves at the top left in a RelativeLayout. You’re extra tags were confusing not only me but likely the parser. Copy paste the above code and make changes incrementally next time! 🙂

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

Sidebar

Related Questions

The code below shows a line in different colors, but that's a lot of
The code below shows a sample that I've used recently to explain the different
The code below shows me (I think) that the for each loop is about
The code below compiled in Debug configuration in VS2005 SP1 shows two messages with
I have the code below that hides and shows the navigational bar. It is
The code below shows nested while loops, but it's not the very efficient. Suppose
The code below shows a rendered HTML (from Compiled ASP .Net code). I would
The code below shows a small WinForms app which includes a simple Control that
The code below shows adding of ascending-descending images when sorting the GridView but the
The code below shows how I'm cutting my sprites, but the memory usage grows

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.