android - Recommendation different sizes -


i receiving push notifications server creates recommendation , posts recommendation row. however, recommendation card smaller bigger. loading images glide bitmap object, set in builder. when bigger card, displays image, when smaller card, wont display image. happening when send more 1 same notification same content (same source image). tried load images , crop them same size did not help.

this recommendation build():

notification notification = new notificationcompat.bigpicturestyle(             new notificationcompat.builder(mcontext)                     .setautocancel(true)                     .setcontenttitle(mtitle)                     .setcontenttext(mdescription)                     .setpriority(mpriority)                     .setlocalonly(true)                     .setongoing(true)                     .setcolor(mcontext.getresources().getcolor(r.color.fastlane_background))                     .setcategory(notification.category_recommendation)                     .setlargeicon(mcardimagebitmap)                     .setsmallicon(msmallicon)                     .setcontentintent(mintent))             .build(); 

the problem in glide itself. seems image loaded after recommendation built. changed load asynctask , on completion create recommendation. works charm


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -