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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:50:34+00:00 2026-05-31T05:50:34+00:00

This should be easy, but I could not find a solution. I have three

  • 0

This should be easy, but I could not find a solution. I have three ImageViews inside a RelativeLayout. These ImageViews will represent three buttons (I tried using ImageButton as well, same problem there).

Thing is, the three sources, bluered, green and blueyellow are *.png files of some size (in this case larger than the buttons/ImageViews size). I want these sources to scale to fit into the ImageViews and use the dimension of buttonsleftRightMenu. The sources are quadratic images, so this should be easy. Where do I go wrong?

xml file:

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@integer/leftMenuID"
>

<ImageView 
    android:layout_width="@dimen/buttonsLeftRightMenu"
    android:layout_height="@dimen/buttonsLeftRightMenu"
    android:src="@drawable/bluered"
    android:id="@integer/leftMenuButton1ID"
    android:clickable="true"
    android:contentDescription="@string/leftMenuButton1ContentDescription"
    android:layout_alignParentTop="true"
    android:layout_alignParentLeft="true"
    android:scaleType="fitCenter"
    android:adjustViewBounds="true"
 />

 <ImageView 
    android:layout_width="@dimen/buttonsLeftRightMenu"
    android:layout_height="@dimen/buttonsLeftRightMenu"
    android:id="@integer/leftMenuButton2ID"
    android:clickable="true"
    android:src="@drawable/green"
    android:background="@color/transparent"
    android:contentDescription="@string/leftMenuButton2ContentDescription"
    android:layout_below="@integer/leftMenuButton1ID"
    android:scaleType="fitCenter"
 />

 <ImageView 
    android:layout_width="@dimen/buttonsLeftRightMenu"
    android:layout_height="@dimen/buttonsLeftRightMenu"
    android:id="@integer/leftMenuButton3ID"
    android:clickable="true"
    android:src="@drawable/blueyellow"
    android:background="@color/transparent"
    android:contentDescription="@string/leftMenuButton3ContentDescription"
    android:layout_below="@integer/leftMenuButton2ID"
    android:scaleType="fitCenter"
 />

</RelativeLayout>
  • 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-31T05:50:35+00:00Added an answer on May 31, 2026 at 5:50 am

    This was just a stupid mistake. The code works perfectly, just remember to inflate the corrext xml file.

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

Sidebar

Related Questions

This should be easy, but I'm not sure how to best go about it.
So this should be a real easy question but I can't seem to find
This seemed like it should be easy, but I have had trouble getting it
I'm sure this is a very old question, but I could not find a
OK, I'm feeling like this should be easy but am obviously missing something fundamental
This should be an easy problem but... I need to format a currency for
This should be easy for many of you, but for me it's just another
I think this should be easy, but it's evading me. I've got a many-to-many
This seems like it should be an easy thing to do, but for the
This seems like it should be something very easy to do, but every time

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.