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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:06:26+00:00 2026-05-19T22:06:26+00:00

I am having a tad of an issue when creating shortcuts on my android

  • 0

I am having a tad of an issue when creating shortcuts on my android desktop.

First, I have a 72×72 icon, I load it from my SD card into a Bitmap object.

With that bitmap object I set it as my icon resource.

The problem I am having is when I set it, the image on the shortcut appears off center and cut off. From the screen metrics I get the size as 72×72, not sure what the deal is.

Code:

Bitmap theBitmap = BitmapFactory.decodeFile("/sdcard/icon.png");
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, theBitmap)

I’ve tried resizing it and have got it to work utilizing a canvas, drawable and another bitmap, however when restarting the phone it reverts to a small size.

Using the very same icon as a drawable resource makes it look perfect, but its not dynamic:

Parcelable iconResource = Intent.ShortcutIconResource.fromContext(this, R.drawable.icon);
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, iconResource);

Using a Samsung Epic 4g w/ 2.1

  • 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-19T22:06:26+00:00Added an answer on May 19, 2026 at 10:06 pm

    I had a similar issue. I looked at the Launcher source code and I saw that there’s a bug that causes the icon not to appear correctly if the initial bitmap size is too small.

    Scale the bitmap to 128×128 first:

    Bitmap scaledBitmap = Bitmap.createScaledBitmap(theBitmap, 128, 128, true);
    intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, scaledBitmap);
    

    It’ll fix it.

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

Sidebar

Related Questions

having read the docs, https://docs.djangoproject.com/en/dev/topics/signals/ i have created this in my signals.py file: from
have been away from Android for more than a year, trying to pick up
Having some trouble getting a JSON feed to load from my site. I'm starting
I'm using CFStringTokenizer to break a load of text into words, but I'm having
Having used storyboards for a while now I have found them extremely useful however,
Having issue with slider navigation. Works perfectly fine when there are no other unordered
I'm having a tad bit of trouble getting the jQuery Form Plugin to work
Having this problem with my android app I struggled with this for some time
Having some trouble looping through these arrays , i have 4 properties that identical
Having issue with prefetching data and displaying on uitableview. So basically I want to

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.