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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:13:46+00:00 2026-05-25T20:13:46+00:00

package com.android.launcher; import android.graphics.drawable.Drawable; import android.graphics.PixelFormat; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.ColorFilter; class FastBitmapDrawable

  • 0
package com.android.launcher;

import android.graphics.drawable.Drawable;
import android.graphics.PixelFormat;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.ColorFilter;

class FastBitmapDrawable extends Drawable {
    private Bitmap mBitmap;

    FastBitmapDrawable(Bitmap b) {
    mBitmap = b;
    }

    @Override
    public void draw(Canvas canvas) {
    canvas.drawBitmap(mBitmap, 0.0f, 0.0f, null);
    }

    @Override
    public int getOpacity() {
    return PixelFormat.TRANSLUCENT;
    }

    @Override
    public void setAlpha(int alpha) {
    }

    @Override
    public void setColorFilter(ColorFilter cf) {
    }

    @Override
    public int getIntrinsicWidth() {
    return mBitmap.getWidth();
    }

    @Override
    public int getIntrinsicHeight() {
    return mBitmap.getHeight();
    }

    @Override
    public int getMinimumWidth() {
    return mBitmap.getWidth();
    }

    @Override
    public int getMinimumHeight() {
    return mBitmap.getHeight();
    }

    public Bitmap getBitmap() {
    return mBitmap;
    }
}
  • 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-25T20:13:47+00:00Added an answer on May 25, 2026 at 8:13 pm

    It’s not really fair to compare a FastBitmapDrawable to a Bitmap. Traditional Bitmaps are just a type of Object in Java. FastBitmapDrawables however, are a custom class written to extend the functionality of the Drawable class, not the Bitmap class.

    A FastBitmapDrawable contains a traditional Bitmap, and makes a few assumptions that make it convenient to use in certain situations. This is the crucial line:

    canvas.drawBitmap(mBitmap, 0.0f, 0.0f, null);
    

    This FastBitmapDrawable assumes that the bitmap will be placed at (0, 0) on the screen, and that no special Paint object will be used to draw it.

    Really it’s just a convenience. You could get the same performance by manually setting the position to (0, 0) and the Paint to null in a normal Drawable, but this class does that for you automatically.

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

Sidebar

Related Questions

Please consider the following java source: package com.stackoverflow; public class CondSpeed { private static
The app code is package com.musicdownloader; import com.fortumo.android.PaymentActivity; import com.musicdownloader.R; import android.content.Intent; import android.net.Uri;
Main Activity Code. BroadcastExample.java package com.example.broadcast; import android.app.Activity; import android.os.Bundle; import android.util.Log; public class
Here is My Whole Code....... BroadcastExample.java package com.example.broadcast; > import android.app.Activity; import > android.content.Context;
I am trying to use the myType class declared in the package com.mycompany.myproject in
The error I'm receiving is listed here . That's my HibernateUtil.java package com.rosejapan; import
This confuses me. The following compiles fine under Eclipse. package com.example.gotchas; public class GenericHelper1
<?xml version=1.0 encoding=utf-8?> <manifest xmlns:android=http://schemas.android.com/apk/res/android package=com.androidgames android:versionCode=1 android:versionName=1.0> <uses-sdk android:minSdkVersion=3 /> <application android:icon=@drawable/icon android:label=@string/app_name>
This is the manifest file <?xml version=1.0 encoding=utf-8?> <manifest xmlns:android=http://schemas.android.com/apk/res/android package=net.learn2develop.SMSMessaging android:versionCode=1 android:versionName=1.0> <uses-sdk
I have an aidl file defined as follows: package com.erbedo.callalert; interface RemoteCallAlert { void

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.