android.widget.CheckBox.setTextColor()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(162)

本文整理了Java中android.widget.CheckBox.setTextColor()方法的一些代码示例,展示了CheckBox.setTextColor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CheckBox.setTextColor()方法的具体详情如下:
包路径:android.widget.CheckBox
类名称:CheckBox
方法名:setTextColor

CheckBox.setTextColor介绍

暂无

代码示例

代码示例来源:origin: aa112901/remusic

@Override
public void setTextColor(int color) {
  super.setTextColor(color);
  if (mTextHelper != null) {
    mTextHelper.setTextColor();
  }
}

代码示例来源:origin: aa112901/remusic

@Override
public void setTextColor(ColorStateList colors) {
  super.setTextColor(colors);
  if (mTextHelper != null) {
    mTextHelper.setTextColor();
  }
}

代码示例来源:origin: googlemaps/android-maps-utils

/**
 * Creates check box for a given search term
 *
 * @param keyword the search terms associated with the check box
 */
private void makeCheckBox(final String keyword) {
  mCheckboxLayout.setVisibility(View.VISIBLE);
  // Make new checkbox
  CheckBox checkBox = new CheckBox(this);
  checkBox.setText(keyword);
  checkBox.setTextColor(HEATMAP_COLORS[mOverlaysRendered]);
  checkBox.setChecked(true);
  checkBox.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
      CheckBox c = (CheckBox) view;
      // Text is the keyword
      TileOverlay overlay = mOverlays.get(keyword);
      if (overlay != null) {
        overlay.setVisible(c.isChecked());
      }
    }
  });
  mCheckboxLayout.addView(checkBox);
}

代码示例来源:origin: offensive-security/nethunter-app

@Override
  public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    if (isChecked) {
      new Thread(new Runnable() {
        public void run() {
          Log.d("bootservice", "ADD " + services[position][4]);
          addBootService(position);
        }
      }).start();
      _serviceBootStates[position] = "1";
      finalVH.swBootCheckbox.setTextColor(mContext.getResources().getColor(R.color.blue));
    } else {
      new Thread(new Runnable() {
        public void run() {
          Log.d("bootservice", "REMOVE " + services[position][4]);
          removeBootService(position);
        }
      }).start();
      _serviceBootStates[position] = "0";
      finalVH.swBootCheckbox.setTextColor(mContext.getResources().getColor(R.color.clearTitle));
    }
  }
});

代码示例来源:origin: playerone-id/EosCommander

@Override
protected void setUpView(View view) {
  Bundle args = getArguments();
  mWalletName = args.getString( ARG_WALLET_NAME );
  ((TextView)view.findViewById( R.id.tv_password)).setText( args.getString( ARG_WALLET_PASSWORD ));
  mSavePassword = view.findViewById( R.id.cb_save_password);
  mSavePassword.setChecked( args.getBoolean( ARG_SAVE_PASSWORD_FOR_TESTING ));
  if ( ! args.getBoolean( ARG_ENABLE_CHECKER_FOR_SAVE_PASSWORD)) {
    mSavePassword.setEnabled( false );
    mSavePassword.setTextColor(getResources().getColor(R.color.colorGray) );
  }
  view.findViewById( R.id.btn_close).setOnClickListener( v -> dismiss());
}

代码示例来源:origin: EmpireProject/EmpireMobile

cb = new CheckBox(MyApplication.getContext());
cb.setText(allNames.get(i));
cb.setTextColor(Color.WHITE);
cb.setId(i);
cb.setOnClickListener(MyListener);

代码示例来源:origin: EmpireProject/EmpireMobile

cb = new CheckBox(MyApplication.getContext());
cb.setText(allNames.get(i));
cb.setTextColor(Color.WHITE);
cb.setId(i);
cb.setOnClickListener(MyListener);

代码示例来源:origin: offensive-security/nethunter-app

vH.swBootCheckbox.setTextColor(mContext.getResources().getColor(R.color.blue));
} else {
  vH.swBootCheckbox.setTextColor(mContext.getResources().getColor(R.color.clearTitle));

代码示例来源:origin: WomenWhoCode/WomenWhoCode

cb.setTextColor(ContextCompat.getColor(getContext(), R.color.tabOpacity));
l.addView(cb);

代码示例来源:origin: UdacityAndroidDevScholarship/quiz-app

checkBox.setTextColor(ContextCompat.getColor(this,
    R.color.color_red_deadline));
checkBox.setTextColor(ContextCompat.getColor(this,
    R.color.color_green_deadline));

代码示例来源:origin: Sea-n/Android-TG-Bot

checkBox.setTextColor(Color.BLACK);
checkBox.setText(name);

代码示例来源:origin: dalong982242260/FlowLayout

chk.setText(flow.getFlowName());
chk.setTextSize(TypedValue.COMPLEX_UNIT_SP, mTextSize);
if (mTextColor != null) chk.setTextColor(mTextColor);
chk.setBackgroundResource(mBackground);
chk.setTag(mChildList == null ? 0 : mChildList.size());

代码示例来源:origin: Odoo-mobile/framework

mCheckbox.setTextAppearance(mContext, appearance);
mCheckbox.setTextColor(textColor);
addView(mCheckbox);

相关文章