android - Load Bitmap on BaseAdapter -


hi want load resource drawable in bitmap type @ baseadapter error

bitmap bm = bitmapfactory.decoderesource(getresources(), r.drawable.messenger); 

the getresource() need make function on java file.

how it?

pass activity instance base adapter first , change function

bitmap bm = bitmapfactory.decoderesource(activity.getresources(), r.drawable.messenger); 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -