本文整理汇总了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));
}
}
示例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());
}
}
示例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());
}
}
示例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;
}