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


Java IconTextView.setText方法代码示例

本文整理汇总了Java中com.joanzapata.iconify.widget.IconTextView.setText方法的典型用法代码示例。如果您正苦于以下问题:Java IconTextView.setText方法的具体用法?Java IconTextView.setText怎么用?Java IconTextView.setText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.joanzapata.iconify.widget.IconTextView的用法示例。


在下文中一共展示了IconTextView.setText方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onBindView

import com.joanzapata.iconify.widget.IconTextView; //导入方法依赖的package包/类
@Override
public void onBindView(@Nullable Bundle savedInstanceState, View rootView) {
    final int size = ITEMS.size();
    for (int i = 0; i < size; i++) {
        LayoutInflater.from(getContext()).inflate(R.layout.bottom_item_icon_text_layout, mBottomBar);
        final RelativeLayout item = (RelativeLayout) mBottomBar.getChildAt(i);
        //设置每个item的点击事件
        item.setTag(i);
        item.setOnClickListener(this);
        final IconTextView itemIcon = (IconTextView) item.getChildAt(0);
        final AppCompatTextView itemTitle = (AppCompatTextView) item.getChildAt(1);
        final BottomTabBean bean = TAB_BEANS.get(i);
        //初始化数据
        itemIcon.setText(bean.getICON());
        itemTitle.setText(bean.getTITLE());
        if (i == mIndexDelegate) {
            itemIcon.setTextColor(mClickedColor);
            itemTitle.setTextColor(mClickedColor);
        }
    }
    final ISupportFragment[] delegateArray = ITEM_DELEGATES.toArray(new ISupportFragment[size]);
    getSupportDelegate().loadMultipleRootFragment(R.id.bottom_bar_delegate_container, mIndexDelegate, delegateArray);

}
 
开发者ID:remerber,项目名称:FastEc,代码行数:25,代码来源:BaseBottomDelegate.java

示例2: 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);

        }


    }
 
开发者ID:remerber,项目名称:FastEc,代码行数:21,代码来源:StarLayout.java

示例3: wireFavoriteShortcut

import com.joanzapata.iconify.widget.IconTextView; //导入方法依赖的package包/类
public static void wireFavoriteShortcut(final Activity activity, final View view, final String personId, final PersonManager personManager) {
    PersonPOJO personPOJO = personManager.getPerson(personId);
    final IconTextView favorite = (IconTextView) view.findViewById(R.id.favorite_btn);
    final String favoriteOn = activity.getString(R.string.favorite_on);
    final String favoriteOff = activity.getString(R.string.favorite_off);

    // favorite
    if (personPOJO.isFavorite()) {
        favorite.setText(favoriteOn);
    } else {
        favorite.setText(favoriteOff);
    }
    favorite.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            PersonPOJO updatedPerson = personManager.getPerson(personId);
            if (updatedPerson.isFavorite()) {
                personManager.unfavoritePerson(updatedPerson.getId());
                favorite.setText(favoriteOff);
            } else {
                personManager.favoritePerson(updatedPerson.getId());
                favorite.setText(favoriteOn);
            }
        }
    });
}
 
开发者ID:ceaseless-prayer,项目名称:CeaselessAndroid,代码行数:27,代码来源:CommonUtils.java

示例4: 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);
            }
        }

    }
 
开发者ID:remerber,项目名称:FastEc,代码行数:13,代码来源:StarLayout.java

示例5: 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);
            }
        }

    }
 
开发者ID:remerber,项目名称:FastEc,代码行数:13,代码来源:StarLayout.java

示例6: setText

import com.joanzapata.iconify.widget.IconTextView; //导入方法依赖的package包/类
@ReactProp(name = PROP_ICON)
public void setText(IconTextView view, @Nullable String text) {
    Log.i("IconTextView", "setText: "+ text);
    view.setText(text);
}
 
开发者ID:lwhiteley,项目名称:react-native-android-iconify,代码行数:6,代码来源:ReactIconTextViewManager.java


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