I want to get user image like byte array from server and show this image instead of icon in Actionbar. I searched and founded, i can set image in icon with drawable like getActionBar().setIcon(R.drawable.my_icon) but i want to set image dynamically and i have not image in drawable folder . How can do this?
-
@sree Yes i searched but i can't found an answerFahim– Fahim2018-01-08 11:18:38 +00:00Commented Jan 8, 2018 at 11:18
-
decode your byte array to bitmap, create BitmapDrawable from bitmap and use this method getActionBar().setIcon(yourBitmapDrawable);Truong Giang Dam– Truong Giang Dam2018-01-08 11:19:36 +00:00Commented Jan 8, 2018 at 11:19
Add a comment
|