Tabnine Logo
RadioButton.setBackground
Code IndexAdd Tabnine to your IDE (free)

How to use
setBackground
method
in
android.widget.RadioButton

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

origin: stackoverflow.com

   R.drawable.selected_right_background));
} else {
 femaleButton.setBackground(getResources().getDrawable(
   R.drawable.unselected_left_background));
 maleButton.setBackground(getResources().getDrawable(
   R.drawable.selected_right_background));
   R.drawable.unselected_right_background));
} else {
 femaleButton.setBackground(getResources().getDrawable(
   R.drawable.selected_left_background));
 maleButton.setBackground(getResources().getDrawable(
   R.drawable.unselected_right_background));
origin: zhangliangzs/KDemo

  radio.setTextColor(getResources().getColor(R.color.subject_select));
  radio.setChecked(true);
  radio.setBackground(getResources().getDrawable(R.drawable.bg_bottom));
} else {
  radio.setTextColor(getResources().getColor(R.color.kViewztblack));
  radio.setChecked(false);
  radio.setBackground(null);
origin: linglongxin24/ARDevelopDemo

  newRadioButton.setBackground(selectorDrawable);
else
  newRadioButton.setBackgroundDrawable(selectorDrawable);
origin: zhangliangzs/KDemo

  @Override
  public void onCheckedChanged(RadioGroup group, int checkedId) {
    int radioButtonId = group.getCheckedRadioButtonId();
    // 根据ID获取RadioButton的实例
    RadioButton rb = (RadioButton) findViewById(radioButtonId);
    for (int i = 0; i < group.getChildCount(); i++) {
      RadioButton vradio = (RadioButton) group.getChildAt(i);
      vradio.setGravity(Gravity.CENTER);
      vradio.setPadding(20, 20, 20, 20);
      if (rb.getId() == vradio.getId()) {
        vradio.setTextColor(getResources().getColor(R.color.subject_select));
        vradio.setChecked(true);
        vradio.setBackground(getResources().getDrawable(R.drawable.bg_bottom));
      } else {
        vradio.setTextColor(getResources().getColor(R.color.kViewztblack));
        vradio.setChecked(false);
        vradio.setBackground(null);
      }
    }
    //           CustomProgress.show(mContext, true, null);
    kChartTimeInterval = titleList.get(checkedId - 1).get("time") + "";
    indexMarketChart();
  }
});
origin: mvpleung/SwitchButton

mRadioButton.setButtonDrawable(mButtonDrawables != null ? mButtonDrawables.get(i, colorDrawable) : colorDrawable);
if (Build.VERSION.SDK_INT >= 16) {
  mRadioButton.setBackground(getStateDrawable(i));
} else {
  mRadioButton.setBackgroundDrawable(getStateDrawable(i));
origin: h4h13/RetroMusicPlayer

TintHelper.setTint(radioButton, color, isDark);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
  radioButton.setBackground(null);
android.widgetRadioButtonsetBackground

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)
  • CodeWhisperer 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