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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:33:01+00:00 2026-06-11T03:33:01+00:00

I am trying to get a logo to have the same scaling no matter

  • 0

I am trying to get a logo to have the same scaling no matter the size of the parent’s view. Right now the logo is scaled down vertically but no horizontally causing the logo to have a smushed look to it. I’d like it to scale both x and y equally so that it maintains it’s form without a smushed or stretched look.

I have tried various scaleTypes, but they haven’t seemed to help thus far.

XML CODE FOR BUTTON:

<ImageView
                android:id="@+id/logo"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_toRightOf="@id/title"
                android:background="@android:color/transparent"
                android:src="@android:color/transparent" />

FULL XML CODE (GIVE CONTEXT):

<RelativeLayout
            android:id="@+id/menu"
            android:layout_width="fill_parent"
            android:layout_height="0dp"
            android:layout_weight="30"
            android:background="@android:color/transparent"
            android:baselineAligned="false" >

            <TextView
                android:id="@+id/title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@android:color/transparent"
                android:gravity="right|bottom"
                android:shadowColor="@android:color/transparent"
                android:text="THE BLIND GOAT"
                android:textColor="@android:color/transparent"
                android:textSize="24dp"
                android:textStyle="bold|italic"
                android:typeface="sans" />

            <Button
                android:id="@+id/help"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/title"
                android:background="@android:color/transparent"
                android:clickable="false"
                android:paddingBottom="0dp"
                android:paddingLeft="2dp"
                android:paddingRight="2dp"
                android:paddingTop="0dp"
                android:text="HELP"
                android:textColor="@android:color/transparent"
                android:textSize="9dp"
                android:textStyle="bold"
                android:typeface="monospace" />

            <Button
                android:id="@+id/settings"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toRightOf="@id/help"
                android:layout_below="@id/title"
                android:background="@android:color/transparent"
                android:clickable="false"
                android:paddingBottom="0dp"
                android:paddingLeft="2dp"
                android:paddingRight="2dp"
                android:paddingTop="0dp"
                android:text="SETTINGS"
                android:textColor="@android:color/transparent"
                android:textSize="9dp"
                android:textStyle="bold"
                android:typeface="monospace" />

            <Button
                android:id="@+id/logout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toRightOf="@id/settings"
                android:layout_below="@id/title"
                android:background="@android:color/transparent"
                android:clickable="false"
                android:paddingBottom="0dp"
                android:paddingLeft="2dp"
                android:paddingRight="2dp"
                android:paddingTop="0dp"
                android:text="LOGOUT"
                android:textColor="@android:color/transparent"
                android:textSize="9dp"
                android:textStyle="bold"
                android:typeface="monospace" />

            <Button
                android:id="@+id/profile"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/settings"
                android:background="@android:color/transparent"
                android:clickable="false"
                android:textColor="@android:color/transparent"
                android:textSize="15dp"
                android:textStyle="bold"
                android:typeface="serif" />

            <ImageView
                android:id="@+id/logo"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_toRightOf="@id/title"
                android:background="@android:color/transparent"
                android:src="@android:color/transparent"
                android:scaleType="centerCrop" />
        </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-06-11T03:33:03+00:00Added an answer on June 11, 2026 at 3:33 am

    Your Image display is decided by two factors:

    The size of your ImageView (You can think of this as a Frame or Canvas which the image can be drawn onto) and it’s position. If the ImageView is small then the image can only ever fill that amount of space.

    The second factor is the scaleType which is described here. If you tell the ImageView via it’s scaleType attribute to use “center” it will draw from the center at the Images native size. If you use the scaleType “fit_center” the Image will scale itself to fit inside the ImageView with the correct proportions (it won’t be stretched or squashed).

    Hope that helps!

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

Sidebar

Related Questions

I have been trying to get this code to work for a while now
i have been trying to get the singer/songwriter title to float to the right
I'm trying to get an application to pass the Windows 7 Software Logo Toolkit
trying to get same string on tooltip as is in the Text e.g. Text=<%#
I'm trying to get an image and a list in the same 'scroll' (I
I've been trying to get this code to work for a few hours now
trying to get my first HTML/CSS uni assignment sorted but have become a bit
Hello I have a header that I am trying to get working and I
I have a logo that i am trying to center on a page. Dead
I have a div in my html called logo and what I am trying

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.