Android Application Development Tutorial - 42 - Using BitmapFactory and InputStream to set Bitmap

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Travis has left the building..
thanks a lot!

laitchdasi
Автор

Travis/Bucky, Many thanks for your help regarding this series. Your help has been invaluable and I appreciate it.

ezekielthemack
Автор

For those of you who want more info on what a bundle is. It is basically an object used to pass information between activities using intents. When u do putExtras, you push data into the intent in the form of a bundle as a keyValue pair. So for instance I could do putExtras("name", "Travis");

selection
Автор

Another approach would be to save the bitmap before the orientation change with onSaveInstance State by setting (outState.PutParcelable("bitmap", bmp)) and that in turn calls OnRestoreInstanceState, where you can use bmp = and then set the pictureview to the bitmap

Shegg
Автор

till now, now I feel like Travis has become my friend..!

rb
Автор

Hi
The InputStream is = shows the following errors

Supplying the wrong type of resource identifier. For example, when calling Resources.getString(int id), you should be passing R.string.something, not R.drawable.something.
Passing the wrong constant to a method which expects one of a specific set of constants. For example, when calling View#setLayoutDirection, the parameter must be or

joydeepbhattacharjee
Автор

A better approach, the one travis used will give an error if you changed the image view from the xml file

BitmapDrawable bmd = (BitmapDrawable) pic.getDrawable();
snappedPic = bmd.getBitmap()

Jesussavedme_
Автор

Bucky: apple, tuna, bacon...
Travis: ftmp, basicly

phuccon
Автор

It is not easier to set "set wallpaper" button not active for pressing when app starts and set active when we get photo?

alfaa
Автор

Hmm.. Can you just initialize bmp to null, and if bmp == null --> some alert that no image captured. Is this possible ?

knuseski
Автор

Why did i set the int variable "cameraResults" to 0, maybe i miss something in your explanation. Oh and i thought that "requestCode" and "cameraResults" are the same, btw. stands for the same thing, why two different names for it?.

Antila
Автор

Make sure you have the USB driver updated and installed for the phone to connect via usb debug mode.

buildakicker
Автор

Hi! How can we extract bitmap(s) from a video in raw folder?

worldofelectronicsandprogr
Автор

The only thing im unsure of is how and when is onActivityResult method called there is no other mention of it in the code unless the startActivityForResult some how calls it.

Andy
Автор

I swear to god I am going to end up subconsciously saying "for the most part" when I'm talking to people

Rhiokai
Автор

it doesn't work for me, still it changes the mobile wallpaper :/

PaZaDrawing
Автор

When I hit the set wallpaper button it force closes any sugestions.

Murphys
Автор

My application crashes whenever i click "Camera" on list menu...
help me please

leonardototaro
Автор

@aradhyatul

how did you even get it to the phone. i can't get it to the phone :(

totalspelnerd
Автор

if you are in android studio like me, you can put your pic in "raw" profile instead of in "drawable".

tankyren
welcome to shbcf.ru