Codota Logo
RadioButton.setBackgroundResource
Code IndexAdd Codota to your IDE (free)

How to use
setBackgroundResource
method
in
android.widget.RadioButton

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

  • Common ways to obtain RadioButton
private void myMethod () {
RadioButton r =
  • Codota IconView view;(RadioButton) view.findViewById(id)
  • Codota IconRadioGroup radioGroup;(RadioButton) radioGroup.getChildAt(int1)
  • Codota IconContext context;new RadioButton(context)
  • Smart code suggestions by Codota
}
origin: aa112901/remusic

@Override
public void setBackgroundResource(int resId) {
  if (mBackgroundHelper != null) {
    mBackgroundHelper.setBackgroundResId(resId);
  } else {
    super.setBackgroundResource(resId);
  }
}
origin: gyw520gyw/GroupButtonView

  rb.setBackgroundResource(R.drawable.left_button_selector);
  rb.setChecked(true);
} else if (i == 1) {
  rb.setBackgroundResource(R.drawable.right_button_selector);
  rb.setBackgroundResource(R.drawable.left_button_selector);
  rb.setChecked(true);
} else if (i == btnCodeArr.length - 1) {
  rb.setBackgroundResource(R.drawable.right_button_selector);
} else {
  rb.setBackgroundResource(R.drawable.mid_button_selector);
origin: derry/delion

radioButton.setBackgroundResource(0);
origin: vir56k/demo

  /**
   * 创建子 tab
   *
   * @param context
   * @param id
   */
  public static RadioButton creatTabItem(Context context, int id, String text) {
    final int width = DensityUtil.dip2px(context, 80);
    final int height = DensityUtil.dip2px(context, 46);
    final int padding = DensityUtil.dip2px(context, 3);

    RadioButton button;
    button = new RadioButton(context);
    button.setId(id);
//        button.setWidth(width);
//        button.setHeight(height);
    button.setText(text);
    button.setLayoutParams(new LinearLayout.LayoutParams(width, height));
    button.setHeight(height);
    button.setBackgroundResource(R.drawable.tab_item_bg_selector);
    button.setButtonDrawable(context.getResources().getDrawable(android.R.color.transparent));
    button.setGravity(Gravity.CENTER);
    button.setTextColor(context.getResources().getColorStateList(R.color.tab_item_font_color_selector));
    button.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
    button.setPadding(0, 0, 0, padding);
    return button;
  }
}
origin: boredream/DesignResCollection

rb.setBackgroundResource(R.drawable.shape_oval_primary2white_sel);
rb.setOnTouchListener(new View.OnTouchListener() {
  @Override
android.widgetRadioButtonsetBackgroundResource

Popular methods of RadioButton

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Kernel (java.awt.image)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now