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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:45:16+00:00 2026-06-17T18:45:16+00:00

I used the code from this answer , and compiled everything successfully. However, I

  • 0

I used the code from this answer, and compiled everything successfully.

However, I cannot find out how to use the drawable that I have just created. Here is my code:

Drawable dr2 = getResources().getDrawable(android.R.drawable.ic_menu_manage);
Bitmap bitmap2 = ((BitmapDrawable) dr2).getBitmap();
Drawable f = new BitmapDrawable(getResources(), Bitmap.createScaledBitmap(bitmap2, 256, 256, true));

private Integer[] menu_icon = {
    android.R.drawable.f,
    // I can't figure out how to call Drawable f
};

After converting the drawable to the Drawable f, I am unable to find out how to recall the resized drawable. I have tried using all possible locations in my code as to where it may be (/res/drawable and a few other locations). However, I am unable to compile no matter how I try to call Drawable f. Any help would be greatly appreciated!

(And no, I have eight elements in that array, but only copy+pasted one)

  • 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-17T18:45:18+00:00Added an answer on June 17, 2026 at 6:45 pm

    It exists only in memory, not anywhere on disk. You can’t reference it by id. Instead, you need to call versions of functions that take a Drawable rather than ones that take an int resourceID.

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

Sidebar

Related Questions

I have used this code for extracting urls from web page.But in the line
I've used this code https://github.com/johannilsson/android-pulltorefresh It all works perfectly apart from one thing, when
I am using following code to get bitmap from url. This function is used
I used the code from http://www.rgagnon.com/javadetails/java-0580.html to get Motherboard Id, but the result is
I want to get zip code from users current location(Latitude, Longitude), I had used
The Default code used to LIMIT the results fetched from the MySQL database using
I've used the code in Removing Icon from a WPF window to remove the
The following code is used to fetch logs from app engine for further processing.
I have used the following code to pick up an image from phone's gallery:
I've used the following code, taken from here , to create my own custom

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.