colors - How to add rainbow gradient to an Image in android -


i want add transparent rainbow or spectrum gradient bitmap.

in photoshop easy. want programmatically. have gone through lot of research. gradient has 1 starting color , 1 ending. how add rainbow color(multiple color) gradient in android.

or there way add effect bitmap in android? given

enter image description here

for can use translucent image desired gradient , put on top of image view in framelayout. capture bitmap of view.

gradient

once layout ready use this answer capture bitmap it

try convert view (framelayout) bitmap:

public bitmap viewtobitmap(view view) {     bitmap bitmap = bitmap.createbitmap(view.getwidth(), view.getheight(), bitmap.config.argb_8888);     canvas canvas = new canvas(bitmap);     view.draw(canvas);     return bitmap; } 

Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -