本文整理汇总了Java中com.joanzapata.iconify.widget.IconTextView.setTag方法的典型用法代码示例。如果您正苦于以下问题:Java IconTextView.setTag方法的具体用法?Java IconTextView.setTag怎么用?Java IconTextView.setTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.joanzapata.iconify.widget.IconTextView
的用法示例。
在下文中一共展示了IconTextView.setTag方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initStarIcon
import com.joanzapata.iconify.widget.IconTextView; //导入方法依赖的package包/类
private void initStarIcon() {
for (int i = 0; i < STAR_TOTAL_COUNT; i++) {
final IconTextView star = new IconTextView(getContext());
star.setGravity(Gravity.CENTER);
final LayoutParams lp = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
lp.weight = 1;
star.setLayoutParams(lp);
star.setText(ICON_UN_SELECT);
star.setTag(R.id.star_count, i);
star.setTag(R.id.star_is_select, false);
star.setOnClickListener(this);
STARS.add(star);
this.addView(star);
}
}
示例2: selectStar
import com.joanzapata.iconify.widget.IconTextView; //导入方法依赖的package包/类
private void selectStar(int count) {
for (int i = 0; i <= count; i++) {
if (i <= count) {
final IconTextView star = STARS.get(i);
star.setText(ICON_SELECTED);
star.setTextColor(Color.RED);
star.setTag(R.id.star_is_select, true);
}
}
}
示例3: unSelectStar
import com.joanzapata.iconify.widget.IconTextView; //导入方法依赖的package包/类
private void unSelectStar(int count) {
for (int i = 0; i < STAR_TOTAL_COUNT; i++) {
if(i>=count){
final IconTextView star = STARS.get(i);
star.setText(ICON_UN_SELECT);
star.setTextColor(Color.GRAY);
star.setTag(R.id.star_is_select, false);
}
}
}