congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
RadioButton.setTag
Code IndexAdd Tabnine to your IDE (free)

How to use
setTag
method
in
android.widget.RadioButton

Best Java code snippets using android.widget.RadioButton.setTag (Showing top 13 results out of 315)

origin: Meiqia/MeiqiaSDK-Android

private void initData() {
  try {
    JSONArray choiceArray = new JSONArray(choices);
    for (int i = 0; i < choiceArray.length(); i++) {
      RadioButton radioButton = (RadioButton) getLayoutInflater().inflate(R.layout.mq_item_form_radio_btn, null);
      radioButton.setText(choiceArray.getString(i));
      radioButton.setTag(choiceArray.get(i));
      radioButton.setId(View.NO_ID);
      radioButton.setOnCheckedChangeListener(this);
      MQUtils.tintCompoundButton(radioButton, R.drawable.mq_radio_btn_uncheck, R.drawable.mq_radio_btn_checked);
      radioGroup.addView(radioButton, LinearLayout.LayoutParams.MATCH_PARENT, MQUtils.dip2px(MQCollectInfoActivity.this, 48));
    }
  } catch (JSONException e) {
    rootView.setVisibility(View.GONE);
    e.printStackTrace();
  }
}
origin: adafruit/Bluefruit_LE_Connect_Android

inputRadioButton.setTag(pin);
inputRadioButton.setChecked(pin.mode == PinData.kMode_Input || pin.mode == PinData.kMode_InputPullup);
inputRadioButton.setVisibility(pin.isInput || pin.isInputPullup ? View.VISIBLE : View.GONE);
outputRadioButton.setTag(pin);
outputRadioButton.setChecked(pin.mode == PinData.kMode_Output);
outputRadioButton.setVisibility(pin.isOutput ? View.VISIBLE : View.GONE);
pwmRadioButton.setTag(pin);
pwmRadioButton.setChecked(pin.mode == PinData.kMode_PWM);
pwmRadioButton.setVisibility(pin.isPwm ? View.VISIBLE : View.GONE);
analogRadioButton.setTag(pin);
analogRadioButton.setChecked(pin.mode == PinData.kMode_Analog);
analogRadioButton.setVisibility(pin.isAnalog ? View.VISIBLE : View.GONE);
if (isInputModeVisible) {
  RadioButton floatingRadioButton = (RadioButton) convertView.findViewById(R.id.floatingRadioButton);
  floatingRadioButton.setTag(pin);
  floatingRadioButton.setChecked(pin.mode == PinData.kMode_Input);
  pullupRadioButton.setTag(pin);
  pullupRadioButton.setChecked(pin.mode == PinData.kMode_InputPullup);
if (isStateVisible) {
  RadioButton lowRadioButton = (RadioButton) convertView.findViewById(R.id.lowRadioButton);
  lowRadioButton.setTag(pin);
  lowRadioButton.setChecked(pin.digitalValue == PinData.kDigitalValue_Low);
origin: caichengan/ShoppingCartActivity

@Override
public View getView(int i, View convertView, ViewGroup viewGroup) {
  ViewHolder holder;
  String color = getItem(i);
  if(convertView == null){
    holder = new ViewHolder();
    convertView = inflater.inflate(R.layout.item_shoppingcart_attribute,null);
    holder.rbAttribute = (RadioButton) convertView.findViewById(R.id.rb_attribute);
    convertView.setTag(holder);
  }else{
    holder = (ViewHolder) convertView.getTag();
  }
  holder.rbAttribute.setText(color);
  Log.d("hxl","color=="+color);
  holder.rbAttribute.setTag("rbAttribute"+i);
  holder.rbAttribute.setOnClickListener(new MyOnclickListerner(i));
  return convertView;
}
class ViewHolder{
origin: apptentive/apptentive-android

RadioButton radioButton = (RadioButton) inflater.inflate(R.layout.apptentive_survey_question_range_choice, radioGroup, false);
radioButton.setText(defaultNumberFormat.format(i));
radioButton.setTag(i);
radioButton.setOnCheckedChangeListener(this);
radioGroup.addView(radioButton);
origin: zhangliangzs/KDemo

radio.setTag(map1);
myRadioGroup.addView(radio);
origin: gyw520gyw/GroupButtonView

rb.setTag(btnCodeArr[i]);
rb.setText(btnNameArr[i]);
origin: ttdevs/android

private void pairedBluetooth() {
  viewPairedDevices.removeAllViews();
  Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();
  if (null != pairedDevices && pairedDevices.size() > 0) {
    StringBuilder msgBuilder = new StringBuilder();
    int index = 0;
    for (BluetoothDevice device : pairedDevices) {
      RadioButton radioButton = new RadioButton(this);
      radioButton.setId(index++);
      radioButton.setText(String.format("%s\n%s", device.getName(), device.getAddress()));
      radioButton.setTag(device);
      viewPairedDevices.addView(radioButton);
      msgBuilder.append(String.format("%s %s\n", device.getName(), device.getAddress()));
    }
    tvContent.setText(msgBuilder.toString());
    viewPairedDevices.setVisibility(View.VISIBLE);
  } else {
    viewPairedDevices.setVisibility(View.GONE);
  }
}
origin: DeviceConnect/DeviceConnect-Android

/**
 * ピンを選択するためのRadioButtonを作成します.
 * @param inflater インフレータ
 * @param pin ピン
 * @return RadioButtonのインスタンス
 */
private RadioButton createRadioButton(final LayoutInflater inflater,final FaBoShield.Pin pin) {
  RadioButton radio = (RadioButton) inflater.inflate(R.layout.item_fabo_radio_button_pin, null, false);
  radio.setText(pin.getPinNames()[1]);
  radio.setTag(pin);
  radio.setEnabled(!usedPin(pin.getPinNumber()));
  radio.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
    @Override
    public void onCheckedChanged(final CompoundButton compoundButton, final boolean b) {
      if (b) {
        mSelectedPin = pin;
      }
    }
  });
  return radio;
}
origin: GeoODK/collect

r.setTag(Integer.valueOf(i));
r.setEnabled(!prompt.isReadOnly());
r.setFocusable(!prompt.isReadOnly());
origin: stackoverflow.com

rbtn.setTag(group);
origin: GeoODK/collect

r.setText(prompt.getSelectChoiceText(mItems.get(i)));
r.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mAnswerFontsize);
r.setTag(Integer.valueOf(i));
r.setId(QuestionWidget.newUniqueId());
r.setEnabled(!prompt.isReadOnly());
origin: GeoODK/collect

r.setText(prompt.getSelectChoiceText(mItems.get(i)));
r.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mAnswerFontsize);
r.setTag(Integer.valueOf(i));
r.setId(QuestionWidget.newUniqueId());
r.setEnabled(!prompt.isReadOnly());
origin: linglongxin24/ARDevelopDemo

  mEntriesUpDownRadioPadding);
newRadioButton.setCompoundDrawablePadding(0);
newRadioButton.setTag(command);
newRadioButton.setVisibility(View.VISIBLE);
mRadioGroup.addView(newRadioButton, mLayoutParams);
android.widgetRadioButtonsetTag

Popular methods of RadioButton

  • setChecked
  • isChecked
  • setText
  • setOnClickListener
  • setOnCheckedChangeListener
  • <init>
  • getId
  • setId
  • getText
  • setEnabled
  • setVisibility
  • setButtonDrawable
  • setVisibility,
  • setButtonDrawable,
  • setTextColor,
  • setLayoutParams,
  • setBackgroundDrawable,
  • getTag,
  • setBackgroundColor,
  • setTextSize,
  • onDraw

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • startActivity (Activity)
  • setScale (BigDecimal)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • JComboBox (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now