w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Clear Image in the Imageview

setBackgroundDrawable() is deprecated. You should use setBackground instead.

Basically the difference is the parameter. In setImageBitmap() you have to pass a Bitmap object. In setImageDrawable() you have to pass a Drawable object. setBackground just change the background of the imageview.

The imageview can have a background and a image content. If you are defining the background and want to clear the imageview, you should use setBackground(null).





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.