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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:00:05+00:00 2026-06-10T10:00:05+00:00

I am displaying a tiny png drawable resource in an ImageView of larger dimensions

  • 0

I am displaying a tiny png drawable resource in an ImageView of larger dimensions than the original image. This is normal and what I want by the way 🙂

When the ImageView is displayed, the image is blurry, because of the scaling method used I suppose.

I would like to achieve an effect similar to :
http://www.41post.com/4241/programming/android-disabling-anti-aliasing-for-pixel-art
where the original image is upscaled without antialiasing.

Is there a way to achieve that directly with an ImageView of certain width and height (in dips) and a drawable, without having to use an intermediate Bitmap?

  • 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-10T10:00:06+00:00Added an answer on June 10, 2026 at 10:00 am
    <?xml version="1.0" encoding="utf-8"?>
    <bitmap
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:src="@drawable/image"
        android:antialias="false" />
    

    You need to create an drawable, copy the code above on an xml in the drawable folder, then on your layout instead of using your image as source use this xml. This way you disable the antialias for the image.

    Edit: doing this in code.

    BitmapDrawable draw = new BitmapDrawable(R.drawable.image);
    draw.setAntiAlias(false);
    imageView.setImageDrawable(draw);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Displaying an image from a remote server: <img src=http://remotehost/path/to/a.png alt=Image A /> However, if
When displaying all articles of a specific month (given through the urls like this
When displaying my DateTime values, I want them to be formatted like so: February
I am displaying an image right after the app didFinishLaunchingWithOptions , the app consists
im displaying web page content in webview and i want to disable the all
For displaying hyperlink on a page on my android app I am doing this:
For displaying little avatar photos i use $this->itemPhoto(_someID_, 'thumb.icon') , so 'thumb.icon' argument makes
I am displaying any size image to fit in a 175x175 frame so it
I´m displaying images in a ListBox and i want to control the size (small,
I´m displaying a menu with this code: <!-- Subcategory menu from current category -->

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.