我对徽章的概念很陌生。在我的应用程序中,我想在选项卡上显示徽章。为此,我使用了 android-viewbadger.jar 文件。它工作正常,但位置属性不受影响。如何设置位置。如果您需要更多信息,请告诉我。
TabWidget tabs = (TabWidget) findViewById(android.R.id.tabs);
DH_Constant.badgeView = new BadgeView(this, tabs, 2);
// it's working fine
badge1.setBadgePosition(BadgeView.POSITION_CENTER);
// But I Supposed to set it as position to top_left or top_right then it still shows as bottom_left and bottom_right
badge1.setBadgePosition(BadgeView.POSITION_TOP_RIGHT);
DH_Constant.badgeView.setText(DH_Constant.MessagesCount_obj.count);
DH_Constant.badgeView.show();
输出: