PagerSlidingTabStrip icon indicating copy to clipboard operation
PagerSlidingTabStrip copied to clipboard

Way to change tab icon at runtime?

Open abhimanyu209 opened this issue 10 years ago • 2 comments

I have a requirement , where the icons for the tabs are being downloaded from the internet. Since this process is happening asynchronously, I need to be able to set the icons to the tabs when the bitmaps are downloaded.

How can I do this?

Thankx

abhimanyu209 avatar Aug 18 '15 11:08 abhimanyu209

hey, I was able to solve it myself .

This is my solution : (Using Glide)

LinearLayout layout = (LinearLayout) tabsStrip.getChildAt(0); Glide.with(StickerActivity.this) .load(stickers.getResult().get(0).getOutlineSmallBlack()) .diskCacheStrategy(DiskCacheStrategy.ALL) .placeholder(R.drawable.icon_sticker) .into((ImageView) layout.getChildAt(0));

abhimanyu209 avatar Aug 18 '15 12:08 abhimanyu209

thanks @abhimanyu209 it works !

azizimusa avatar Apr 26 '16 07:04 azizimusa