Tabnine Logo
RadioButton.setBackgroundResource
Code IndexAdd Tabnine 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)

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

  • Making http requests using okhttp
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • setRequestProperty (URLConnection)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Menu (java.awt)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • JOptionPane (javax.swing)
  • Top PhpStorm plugins
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