Android Bitmap Loading

Tutorials with advanced 'difficulty' and more Lines of Code.

Android Bitmap Loading

Postby moo_gamer » Mon Mar 15, 2010 11:02 am

Hey! Guys,

I have created a folder in my project root called "images".

Now, I want to load Bitmap using filename like "/images/face.png".

How would I do it? (I don't need solution like R.drawable.face).

Also, how can I access the current acitivity without passing the refferece from other class.

Like, in iPhone I can use [UIApplication sharedApplication] in any class to access the root class.

Please, give me some suggestions.
moo_gamer
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Mar 12, 2010 9:01 pm

Top

Postby wonghkc » Fri Mar 26, 2010 3:30 am

You may use "BitmapFactory" class to return a bitmap object from a file. It's should be work.

http://developer.android.com/reference/ ... ctory.html
wonghkc
Freshman
Freshman
 
Posts: 2
Joined: Mon Sep 14, 2009 2:00 am

Top

Return to Advanced Tutorials

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests