当前位置: 首页>>代码示例>>Java>>正文


Java BadgeView.setVisibility方法代码示例

本文整理汇总了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);
}
 
开发者ID:huang303513,项目名称:Coding-Android,代码行数:17,代码来源:UsersListFragment.java

示例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();
    }
}
 
开发者ID:huang303513,项目名称:Coding-Android,代码行数:22,代码来源:NavigationDrawerFragment.java

示例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;
}
 
开发者ID:jay16,项目名称:shengyiplus-android,代码行数:27,代码来源:MenuAdapter.java

示例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();
	}
}
 
开发者ID:tassadar2002,项目名称:ouser,代码行数:22,代码来源:MenuFragment.java

示例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);
    }
}
 
开发者ID:huang303513,项目名称:Coding-Android,代码行数:9,代码来源:UnreadNotify.java

示例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);
    }
}
 
开发者ID:huang303513,项目名称:Coding-Android,代码行数:10,代码来源:Global.java


注:本文中的com.readystatesoftware.viewbadger.BadgeView.setVisibility方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。