Add badge for tab widget android
Posted
by
user3496459
on Stack Overflow
See other posts from Stack Overflow
or by user3496459
Published on 2014-06-08T09:04:54Z
Indexed on
2014/06/08
9:24 UTC
Read the original article
Hit count: 198
android
I want to add badge for tab widget at android. i use android-viewbadger lib, but i not set badge show to image
here code:
tabs = (TabWidget) findViewById(android.R.id.tabs);
badge = new BadgeView(this, tabs, 2);
// badge.setBackgroundResource(R.drawable.badge_28);
badge.setBadgePosition(BadgeView.POSITION_TOP_RIGHT);
badge.setWidth(14);
badge.setHeight(14);
badge.show();
© Stack Overflow or respective owner