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


Java IconTextView类代码示例

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


IconTextView类属于com.joanzapata.iconify.widget包,在下文中一共展示了IconTextView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: ViewHolder

import com.joanzapata.iconify.widget.IconTextView; //导入依赖的package包/类
public ViewHolder(View itemView) {
    super(itemView);

    vCard = (CardView) itemView.findViewById(R.id.history_card_view);
    vCardSecondary = (CardView) itemView.findViewById(R.id.history_card_secondary_view);

    vTitle = (TextView) itemView.findViewById(R.id.history_card_title);
    vDate = (TextView) itemView.findViewById(R.id.history_card_date);
    vImage = (NetworkImageView) itemView.findViewById(R.id.history_card_image);
    vUser = (TextView) itemView.findViewById(R.id.history_card_user);
    vEpisode = (TextView) itemView.findViewById(R.id.history_card_episode);

    vState = (IconTextView) itemView.findViewById(R.id.history_card_state);
    vProgress = (IconTextView) itemView.findViewById(R.id.history_card_progress);
    vProgressText = (TextView) itemView.findViewById(R.id.history_card_progress_text);

    vStarted = (TextView) itemView.findViewById(R.id.history_card_started);
    vStopped = (TextView) itemView.findViewById(R.id.history_card_stopped);
    vPaused = (TextView) itemView.findViewById(R.id.history_card_paused);
    vDuration = (TextView) itemView.findViewById(R.id.history_card_duration);
    vIPAddress = (TextView) itemView.findViewById(R.id.history_card_ipaddress);
    vPlayer = (TextView) itemView.findViewById(R.id.history_card_player);
}
 
开发者ID:wcomartin,项目名称:PlexPy-Remote,代码行数:24,代码来源:HistoryAdapter.java

示例4: getView

import com.joanzapata.iconify.widget.IconTextView; //导入依赖的package包/类
@Override
public View getView(int position, View view, ViewGroup parent) {
    final ViewHolder holder;
    if (view == null) {
        holder = new ViewHolder();
        view = inflater.inflate(R.layout.list_item_people_active, parent, false);
        holder.favorite = (IconTextView) view.findViewById(R.id.person_active_favorite);
        holder.favorite.setVisibility(View.GONE);
        holder.personThumbnail = (RoundedImageView) view.findViewById(R.id.person_active_thumbnail);
        holder.personListName = (TextView) view.findViewById(R.id.person_active_list_name);
        view.setTag(holder);
    } else {
        holder = (ViewHolder) view.getTag();
    }
    final PersonPOJO person = personManager.getPerson(persons.get(position).getId());
    // thumbnail picture
    Picasso.with(context).load(CommonUtils.getContactUri(person.getId())).placeholder(R.drawable.placeholder_user).fit().into(holder.personThumbnail);
    // person name
    holder.personListName.setText(person.getName());

    return view;
}
 
开发者ID:ceaseless-prayer,项目名称:CeaselessAndroid,代码行数:23,代码来源:SearchResultsActivity.java

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

示例6: onFinishInflate

import com.joanzapata.iconify.widget.IconTextView; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    mRevealContainerCardView = (CardView) findViewById(R.id.CrdVw_RevealContainer);
    mRevealContainerCardView.setOnClickListener(mOnRevelViewClickListener);
    mRevealItem = (LinearLayout) findViewById(R.id.FrmLt_SelectedItem);
    mStartSearchImageView = (IconTextView) findViewById(R.id.ImgVw_StartSearch);

    mContainerCardView = (CardView) findViewById(R.id.CrdVw_Container);
    mSearchEditText = (AppCompatEditText) findViewById(R.id.EdtTxt_SearchEditText);
    mDoneSearchImageView = (IconTextView) findViewById(R.id.ImgVw_DoneSearch);
    init();
}
 
开发者ID:michaelprimez,项目名称:searchablespinner,代码行数:14,代码来源:SearchableSpinner.java

示例7: resetColor

import com.joanzapata.iconify.widget.IconTextView; //导入依赖的package包/类
private void resetColor() {
    final int count = mBottomBar.getChildCount();
    for (int i = 0; i < count; i++) {
        final RelativeLayout item = (RelativeLayout) mBottomBar.getChildAt(i);
        final IconTextView itemIcon = (IconTextView) item.getChildAt(0);
        itemIcon.setTextColor(Color.GRAY);
        final AppCompatTextView itemTitle = (AppCompatTextView) item.getChildAt(1);
        itemTitle.setTextColor(Color.GRAY);
    }
}
 
开发者ID:remerber,项目名称:FastEc,代码行数:11,代码来源:BaseBottomDelegate.java

示例8: onClick

import com.joanzapata.iconify.widget.IconTextView; //导入依赖的package包/类
@Override
public void onClick(View v) {
    final int tag = (int) v.getTag();
    resetColor();
    final RelativeLayout item = (RelativeLayout) v;
    final IconTextView itemIcon = (IconTextView) item.getChildAt(0);
    itemIcon.setTextColor(mClickedColor);
    final AppCompatTextView itemTitle = (AppCompatTextView) item.getChildAt(1);
    itemTitle.setTextColor(mClickedColor);
    getSupportDelegate().showHideFragment(ITEM_DELEGATES.get(tag), ITEM_DELEGATES.get(mCurrentDelegate));
    //注意先后顺序
    mCurrentDelegate = tag;

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

示例9: onClick

import com.joanzapata.iconify.widget.IconTextView; //导入依赖的package包/类
@Override
    public void onClick(View v) {
        final IconTextView star = (IconTextView) v;
        //获取第几个星星
        final int count = (int) star.getTag(R.id.star_count);
        //获取点击状态
        final boolean isSelect = (boolean) star.getTag(R.id.star_is_select);
        if (!isSelect) {
            selectStar(count);
        } else {
unSelectStar(count);
        }
    }
 
开发者ID:remerber,项目名称:FastEc,代码行数:14,代码来源:StarLayout.java

示例10: 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

示例11: 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

示例12: getStarCount

import com.joanzapata.iconify.widget.IconTextView; //导入依赖的package包/类
public int getStarCount() {
    int count = 0;
    for (int i = 0; i < STAR_TOTAL_COUNT; i++) {
        final IconTextView star = STARS.get(i);
        final boolean isSelect = (boolean) star.getTag(R.id.star_is_select);
        if (isSelect) {
            count++;
        }
    }
    return count;
}
 
开发者ID:remerber,项目名称:FastEc,代码行数:12,代码来源:StarLayout.java

示例13: getChildView

import com.joanzapata.iconify.widget.IconTextView; //导入依赖的package包/类
@Override
public View getChildView(final int groupPosition, final int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
    View view;
    AccountHolder holder;
    if(convertView != null) {
        view = convertView;
        holder = (AccountHolder) view.getTag();
    } else {
        view = View.inflate(context, R.layout.list_item_child_account, null);

        holder = new AccountHolder();
        holder.tvUserId = (TextView) view.findViewById(R.id.tv_userid);
        holder.tvUserName = (TextView) view.findViewById(R.id.tv_username);
        holder.tvBalance = (IconTextView) view.findViewById(R.id.tv_balance);

        view.setTag(holder);
    }


    if(child != null && child.size() > 0){
        List<User> users = child.get(groupPosition);
        if(users != null && groups.size() > 0){
            User user = users.get(childPosition);

            holder.tvUserId.setText(String.format("id:%1$s", user.getId()));
            holder.tvUserName.setText(String.format("name:%1$s", user.getName()));
            holder.tvBalance.setText(String.format("balance:%1$s",
                    Coin.fromValue(GlobalParams.coinCode).showMoney(user.getBalance(), user.getBalanceStr())));
        }
    }

    return view;
}
 
开发者ID:chaincloud-dot-com,项目名称:chaincloud-v,代码行数:34,代码来源:AccountExpandableAdapter.java

示例14: getView

import com.joanzapata.iconify.widget.IconTextView; //导入依赖的package包/类
@Override
public View getView(int position, View view, ViewGroup parent) {
    final ViewHolder holder;
    if (view == null) {
        holder = new ViewHolder();
        view = inflater.inflate(R.layout.list_item_people_active, parent, false);
        holder.favorite = (IconTextView) view.findViewById(R.id.person_active_favorite);
        holder.personThumbnail = (RoundedImageView) view.findViewById(R.id.person_active_thumbnail);
        holder.personListName = (TextView) view.findViewById(R.id.person_active_list_name);
        view.setTag(holder);
    } else {
        holder = (ViewHolder) view.getTag();
    }
    final PersonPOJO person = personManager.getPerson(persons.get(position).getId());
    // favorite
    if (person.isFavorite()) {
        holder.favorite.setText(getString(R.string.favorite_on));
    } else {
        holder.favorite.setText(getString(R.string.favorite_off));
    }
    holder.favorite.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            PersonPOJO updatedPerson = personManager.getPerson(person.getId());
            if (updatedPerson.isFavorite()) {
                personManager.unfavoritePerson(updatedPerson.getId());
                holder.favorite.setText(getString(R.string.favorite_off));
            } else {
                personManager.favoritePerson(updatedPerson.getId());
                holder.favorite.setText(getString(R.string.favorite_on));
            }
        }
    });
    // thumbnail picture
    Picasso.with(context).load(CommonUtils.getContactUri(person.getId())).placeholder(R.drawable.placeholder_user).fit().into(holder.personThumbnail);
    // person name
    holder.personListName.setText(person.getName());

    return view;
}
 
开发者ID:ceaseless-prayer,项目名称:CeaselessAndroid,代码行数:41,代码来源:PeopleActiveSupportFragment.java

示例15: wireSendMessage

import com.joanzapata.iconify.widget.IconTextView; //导入依赖的package包/类
public static void wireSendMessage(final Activity activity, View view, final String personId) {
    final IconTextView messageShortcut = (IconTextView) view.findViewById(R.id.message_btn);
    messageShortcut.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            AnalyticsUtils.sendEventWithCategory(AnalyticsUtils.getDefaultTracker(activity),
                    activity.getString(R.string.ga_person_card_actions),
                    activity.getString(R.string.ga_tapped_send_message),
                    Installation.id(activity));
            Uri contactUri = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, Long.parseLong(personId));
            ContactsContract.QuickContact.showQuickContact(activity, messageShortcut, contactUri, ContactsContract.QuickContact.MODE_MEDIUM, null);
        }
    });
}
 
开发者ID:ceaseless-prayer,项目名称:CeaselessAndroid,代码行数:15,代码来源:CommonUtils.java


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