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


Java CheckBox.setTextColor方法代码示例

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


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

示例1: checkGenderSelected

import android.widget.CheckBox; //导入方法依赖的package包/类
private void checkGenderSelected( final CheckBox mGenderPreferenceCheckBoxFemale, final CheckBox mGenderPreferenceCheckBoxMale, final CheckBox mGenderPreferenceCheckBoxNonbinary,
                                  final CheckBox mGenderPreferenceCheckBoxOther ) {
    if (!mGenderPreferenceCheckBoxMale.isChecked() && !mGenderPreferenceCheckBoxFemale.isChecked() &&
            !mGenderPreferenceCheckBoxOther.isChecked() && !mGenderPreferenceCheckBoxNonbinary.isChecked()){
        errorFlag = true;
        mGenderPreferenceCheckBoxMale.setTextColor((getResources().getColor(R.color.colorSignUpError)));
        mGenderPreferenceCheckBoxFemale.setTextColor((getResources().getColor(R.color.colorSignUpError)));
        mGenderPreferenceCheckBoxOther.setTextColor((getResources().getColor(R.color.colorSignUpError)));
        mGenderPreferenceCheckBoxNonbinary.setTextColor((getResources().getColor(R.color.colorSignUpError)));
    } else {
        mGenderPreferenceCheckBoxMale.setTextColor(getResources().getColor(R.color.common_google_signin_btn_text_light));
        mGenderPreferenceCheckBoxFemale.setTextColor(getResources().getColor(R.color.common_google_signin_btn_text_light));
        mGenderPreferenceCheckBoxOther.setTextColor(getResources().getColor(R.color.common_google_signin_btn_text_light));
        mGenderPreferenceCheckBoxNonbinary.setTextColor(getResources().getColor(R.color.common_google_signin_btn_text_light));
    }
}
 
开发者ID:chrisqz95,项目名称:couch-potatoes,代码行数:17,代码来源:SignUpActivity.java

示例2: themeCheckBox

import android.widget.CheckBox; //导入方法依赖的package包/类
public void themeCheckBox(CheckBox chk) {
	if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
		chk.setButtonTintList(getTintList());
		chk.setTextColor(getTextColor());
	}
}
 
开发者ID:HoraApps,项目名称:Liz,代码行数:7,代码来源:ThemeHelper.java

示例3: themeCheckBox

import android.widget.CheckBox; //导入方法依赖的package包/类
public void themeCheckBox(CheckBox chk) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    chk.setButtonTintList(getTintList());
    chk.setTextColor(getTextColor());
  }
}
 
开发者ID:Arjun-sna,项目名称:Android-AudioRecorder-App,代码行数:7,代码来源:ThemeHelper.java

示例4: getView

import android.widget.CheckBox; //导入方法依赖的package包/类
public View getView(int position, View convertView, ViewGroup parent) {
    Holder holder;
    if (convertView == null) {
        convertView = View.inflate(this.activity, R.layout.n0, null);
        holder = new Holder(convertView);
        convertView.setTag(holder);
    } else {
        holder = (Holder) convertView.getTag();
    }
    Post post = getItem(position);
    initAvatar(holder.avatarImage, post);
    initAvatarTag(holder.lightProgress, holder.officialImage, post);
    holder.nickName.setText(post.user.nickname);
    holder.nickName.setOnClickListener(new AvatarClickListener(post));
    initTimeAndBody(holder.postTime, holder.body, post);
    this.mDefaultImageDrawable = new ColorDrawable(this.resource.getColor(this
            .PREVIEW_COLORS[position % this.PREVIEW_COLORS.length]));
    initPostImage(holder.nineGridLayout, post.photos);
    initMarkImage(holder.markImage, post);
    initAttachment(holder.attachmentLayout, holder.tvAttachment, holder.ivAttachment, holder
            .video, post);
    if (post.disabled) {
        holder.ll_bottom.setVisibility(8);
        holder.repostUser.setVisibility(8);
    } else {
        int color;
        holder.ll_bottom.setVisibility(0);
        holder.repostUser.setVisibility(0);
        holder.rl_praise.setOnClickListener(new PraiseClickListener(this.activity, post,
                holder.rl_praise, holder.cb_praise, holder.tv_praise_plus));
        holder.tv_comment.setText(post.comment_count + "");
        holder.cb_praise.setText(post.envious_count + "");
        holder.cb_praise.setChecked(!TextUtils.isEmpty(post.feedback));
        CheckBox checkBox = holder.cb_praise;
        if (TextUtils.isEmpty(post.feedback)) {
            color = this.activity.getResources().getColor(R.color.du);
        } else {
            color = this.activity.getResources().getColor(R.color.hb);
        }
        checkBox.setTextColor(color);
        TimeLineUtility.initCommentButton(this.activity, holder.ll_comment, holder
                .tv_comment, post, position);
        initMenu(holder.ll_menu, position);
        initRepostUser(holder.repostUser, post);
    }
    return convertView;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:48,代码来源:HomeTimelineAdapter.java


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