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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:48:44+00:00 2026-06-15T18:48:44+00:00

I have two imageviews in a relative layout. One keeps acting almost 3 times

  • 0

I have two imageviews in a relative layout. One keeps acting almost 3 times the width as the other. Both pngs are 60px x 60px, so I don’t understand why one is being drawn 3 times as wide. The image is not stretched, it just takes up 3 times more width in the relative layout.

The two imageviews:

<RelativeLayout
    android:id="@+id/linerlayout1"
    android:layout_width="wrap_content"
    android:layout_height="50dp"
    android:layout_above="@+id/container_ide"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:background="@drawable/gradient" >

    <ImageView
        android:id="@+id/imageView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:layout_weight="1"
        android:clickable="true"
        android:onClick="that"
        android:padding="6dp"
        android:src="@drawable/icon_image" />

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_weight="1"
        android:clickable="true"
        android:onClick="this"
        android:padding="6dp"
        android:src="@drawable/image_two" />

</RelativeLayout>

They should (In my knowledge) behave exactly the same. As you can see in the screenshot below @drawable/image_two is acting way off. The bounding box being three times too wide is killing my layout. Any ideas?

enter image description here

  • 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-15T18:48:45+00:00Added an answer on June 15, 2026 at 6:48 pm

    Your code works fine for me with different image.

    So perhaps it is something to do with your image?

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

Sidebar

Related Questions

I have two ImageViews, one called imageView and the other called subView (which is
I have a layout that contains two ImageViews. I want one of them to
I have got relative layout, in that i have placed two textviews, one image
I have a layout containing two textViews and one ImageView. the first text is
Right now, I have a layout that looks like one of the two images
If I have a layout with two ImageViews. Their id's are image_one and image_two.
In My application XML layout, I have one Relativelayout, In which there are two
One of the activities in my Android app has a relative layout with two
I have an activity with two imageviews one on another(merged in xml). one is
Hi im trying to accomplish the following layout. I have two RelativeLayout, each one

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.