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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:35:15+00:00 2026-06-07T08:35:15+00:00

By reading the Android doc, I expect a picture with this layout: <ImageView android:id=@+id/avatar

  • 0

By reading the Android doc, I expect a picture with this layout:

<ImageView
    android:id="@+id/avatar"
    android:layout_width="fill_parent"
    android:layout_height="150dip"
    android:adjustViewBounds="true"
    android:scaleType="centerCrop" />

to fill the layout (height of 150 dip is the only condition) without any distorsion:

CENTER_CROP Scale the image uniformly (maintain the image’s aspect
ratio) so that both dimensions (width and height) of the image will be
equal to or larger than the corresponding dimension of the view (minus
padding).

That works pretty well on phones:

enter image description here

But on tablet the image is totally distorted:

enter image description here

How is that possible to say: “please do not stretch horizontally”

  • 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-07T08:35:16+00:00Added an answer on June 7, 2026 at 8:35 am

    I think you’re specifying the image as a background rather than as a source. The images look stretched on the phone as well, and CenterCrop should work fine.

    Try using the setImageBitmap or the “src” attribute and let me know if it works.

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

Sidebar

Related Questions

This is sort of out of curiosity question. Reading through Pro Android 3 book
I was reading this section in the Android Dev Guide : here and I
I've been reading this post on the android developer blog about the twitter client
The main.xml file code: <TableRow android:id=@+id/TableRow01 android:layout_width=wrap_content android:layout_height=wrap_content> <TextView android:text=User android:id=@+id/TextView01 android:layout_width=wrap_content android:layout_height=wrap_content></TextView> <EditText
After reading the android documentation about String, which includes this: This class is implemented
I was reading this http://developer.android.com/guide/topics/wireless/bluetooth.html#QueryingPairedDevices which is allot of help on how to pair,connect
I've been reading about layout optimization from the Android Dev blogs and I've been
After reading the Android NDK documentation i am a bit confused on this issue.
I was reading a beginners tutorial on android development which had this line in
While reading the Android guide to Notifications , I stumbled across this: Adding vibration

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.