本文整理汇总了Java中com.flyco.tablayout.utils.UnreadMsgUtils类的典型用法代码示例。如果您正苦于以下问题:Java UnreadMsgUtils类的具体用法?Java UnreadMsgUtils怎么用?Java UnreadMsgUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UnreadMsgUtils类属于com.flyco.tablayout.utils包,在下文中一共展示了UnreadMsgUtils类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showMsg
import com.flyco.tablayout.utils.UnreadMsgUtils; //导入依赖的package包/类
/**
* 显示未读消息
*
* @param position 显示tab位置
* @param num num小于等于0显示红点,num大于0显示数字
*/
public void showMsg(int position, int num) {
if (position >= mTabCount) {
position = mTabCount - 1;
}
View tabView = mTabsContainer.getChildAt(position);
MsgView tipView = (MsgView) tabView.findViewById(R.id.rtv_msg_tip);
if (tipView != null) {
UnreadMsgUtils.show(tipView, num);
if (mInitSetMap.get(position) != null && mInitSetMap.get(position)) {
return;
}
setMsgMargin(position, 2, 2);
mInitSetMap.put(position, true);
}
}
示例2: showMsg
import com.flyco.tablayout.utils.UnreadMsgUtils; //导入依赖的package包/类
/**
* 显示未读消息
*
* @param position 显示tab位置
* @param num num小于等于0显示红点,num大于0显示数字
*/
public void showMsg(int position, int num) {
if (position >= mTabCount) {
position = mTabCount - 1;
}
View tabView = mTabsContainer.getChildAt(position);
MsgView tipView = (MsgView) tabView.findViewById(R.id.rtv_msg_tip);
if (tipView != null) {
UnreadMsgUtils.show(tipView, num);
if (mInitSetMap.get(position) != null && mInitSetMap.get(position)) {
return;
}
if (!mIconVisible) {
setMsgMargin(position, 2, 2);
} else {
setMsgMargin(position, 0,
mIconGravity == Gravity.LEFT || mIconGravity == Gravity.RIGHT ? 4 : 0);
}
mInitSetMap.put(position, true);
}
}
示例3: showMsg
import com.flyco.tablayout.utils.UnreadMsgUtils; //导入依赖的package包/类
/**
* 显示未读消息
*
* @param position 显示tab位置
* @param num num小于等于0显示红点,num大于0显示数字
*/
public void showMsg(int position, int num) {
if (position >= mTabCount) {
position = mTabCount - 1;
}
View tabView = mTabsContainer.getChildAt(position);
MsgView tipView = (MsgView) tabView.findViewById(R.id.rtv_msg_tip);
if (tipView != null) {
UnreadMsgUtils.show(tipView, num);
if (mInitSetMap.get(position) != null && mInitSetMap.get(position)) {
return;
}
setMsgMargin(position, 4, 2);
mInitSetMap.put(position, true);
}
}
示例4: showMsg
import com.flyco.tablayout.utils.UnreadMsgUtils; //导入依赖的package包/类
/**
* 显示未读消息
*
* @param position 显示tab位置
* @param num num小于等于0显示红点,num大于0显示数字
*/
public void showMsg(int position, int num) {
if (position >= mTabCount) {
position = mTabCount - 1;
}
View tabView = mTabsContainer.getChildAt(position);
RoundTextView tipView = (RoundTextView) tabView.findViewById(R.id.rtv_msg_tip);
if (tipView != null) {
UnreadMsgUtils.show(tipView, num);
if (mInitSetMap.get(position) != null && mInitSetMap.get(position)) {
return;
}
setMsgMargin(position, 2, 2);
mInitSetMap.put(position, true);
}
}
示例5: showMsg
import com.flyco.tablayout.utils.UnreadMsgUtils; //导入依赖的package包/类
/**
* 显示未读消息
*
* @param position 显示tab位置
* @param num num小于等于0显示红点,num大于0显示数字
*/
public void showMsg(int position, int num) {
if (position >= mTabCount) {
position = mTabCount - 1;
}
View tabView = mTabsContainer.getChildAt(position);
RoundTextView tipView = (RoundTextView) tabView.findViewById(R.id.rtv_msg_tip);
if (tipView != null) {
UnreadMsgUtils.show(tipView, num);
if (mInitSetMap.get(position) != null && mInitSetMap.get(position)) {
return;
}
if (!mIconVisible) {
setMsgMargin(position, 2, 2);
} else {
setMsgMargin(position, 0,
mIconGravity == Gravity.LEFT || mIconGravity == Gravity.RIGHT ? 4 : 0);
}
mInitSetMap.put(position, true);
}
}
示例6: showMsg
import com.flyco.tablayout.utils.UnreadMsgUtils; //导入依赖的package包/类
/**
* 显示未读消息
*
* @param position 显示tab位置
* @param num num小于等于0显示红点,num大于0显示数字
*/
public void showMsg(int position, int num) {
if (position >= mTabCount) {
position = mTabCount - 1;
}
View tabView = mTabsContainer.getChildAt(position);
RoundTextView tipView = (RoundTextView) tabView.findViewById(R.id.rtv_msg_tip);
if (tipView != null) {
UnreadMsgUtils.show(tipView, num);
if (mInitSetMap.get(position) != null && mInitSetMap.get(position)) {
return;
}
setMsgMargin(position, 4, 2);
mInitSetMap.put(position, true);
}
}