congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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