本文整理汇总了Java中com.readystatesoftware.viewbadger.BadgeView.setVisibility方法的典型用法代码示例。如果您正苦于以下问题:Java BadgeView.setVisibility方法的具体用法?Java BadgeView.setVisibility怎么用?Java BadgeView.setVisibility使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.readystatesoftware.viewbadger.BadgeView
的用法示例。
在下文中一共展示了BadgeView.setVisibility方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initHead
import com.readystatesoftware.viewbadger.BadgeView; //导入方法依赖的package包/类
private void initHead() {
View v = mInflater.inflate(layout.fragment_message_user_list_head, null, false);
v.findViewById(id.atLayout).setOnClickListener(v1 -> startNotifyListActivity(0));
v.findViewById(id.commentLayout).setOnClickListener(v1 -> startNotifyListActivity(1));
v.findViewById(id.systemLayout).setOnClickListener(v1 -> startNotifyListActivity(4));
badgeAt = (BadgeView) v.findViewById(id.badgeAt);
badgeAt.setVisibility(View.INVISIBLE);
badgeComment = (BadgeView) v.findViewById(id.badgeComment);
badgeComment.setVisibility(View.INVISIBLE);
badgeSystem = (BadgeView) v.findViewById(id.badgeSystem);
badgeSystem.setVisibility(View.INVISIBLE);
listView.addHeaderView(v);
}
示例2: init
import com.readystatesoftware.viewbadger.BadgeView; //导入方法依赖的package包/类
@AfterViews
void init() {
UserObject user = AccountInfo.loadAccount(getActivity());
setControlContent(user);
for (int i = 0; i < radioIds.length; ++i) {
radios[i] = (RadioButton) getView().findViewById(radioIds[i]);
radios[i].setOnClickListener(clickItem);
}
radios[0].setChecked(true);
badgeProject = (BadgeView) getView().findViewById(R.id.badge0);
badgeProject.setVisibility(View.INVISIBLE);
badgeMessage = (BadgeView) getView().findViewById(R.id.badge3);
badgeMessage.setVisibility(View.INVISIBLE);
if (mFirstDisplay) {
updateUserinfo();
}
}
示例3: getView
import com.readystatesoftware.viewbadger.BadgeView; //导入方法依赖的package包/类
public View getView(int position, View convertView, ViewGroup parent) {
View v = super.getView(position, convertView, parent);
TextView itemName = (TextView) v.findViewById(R.id.text_menu_item);
if (itemName.getText().equals("个人信息")) {
if (convertView != null) {
return v;
}
JSONObject notificationJSON = FileUtil.readConfigFile(noticePath);
try {
BadgeView bvUser = new BadgeView(mContext, itemName);
bvUser.setVisibility(View.GONE);
if (notificationJSON.getInt(URLs.kSetting) > 0) {
RedPointView.showRedPoint(mContext, "user", bvUser);
}
} catch (JSONException e) {
e.printStackTrace();
}
}
return v;
}
示例4: setBadgeCount
import com.readystatesoftware.viewbadger.BadgeView; //导入方法依赖的package包/类
private void setBadgeCount(TopFragmentType type) {
int count = 0;
BadgeView view = null;
if (type == TopFragmentType.MyMessage) {
count = Cache.self().getUnReadedCount();
view = mMessageCount;
} else {
count = Cache.self().getTimelineCount();
view = mTimelineCount;
}
if (count == 0) {
view.setVisibility(View.GONE);
} else {
view.setVisibility(View.VISIBLE);
view.setText(String.valueOf(count));
view.setTextSize(10);
view.setBadgePosition(BadgeView.POSITION_TOP_LEFT);
view.show();
}
}
示例5: displayNotify
import com.readystatesoftware.viewbadger.BadgeView; //导入方法依赖的package包/类
public static void displayNotify(BadgeView badgeView, String messageCount) {
if (messageCount.isEmpty()) {
badgeView.setVisibility(View.INVISIBLE);
} else {
badgeView.setText(messageCount);
badgeView.setVisibility(View.VISIBLE);
}
}
示例6: setBadgeView
import com.readystatesoftware.viewbadger.BadgeView; //导入方法依赖的package包/类
public static void setBadgeView(BadgeView badge, int count) {
if (count > 0) {
String countString = count > 99 ? "99+" : ("" + count);
badge.setText(countString);
badge.setVisibility(View.VISIBLE);
} else {
badge.setVisibility(View.INVISIBLE);
}
}