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

How to use
getLayoutParams
method
in
android.widget.RadioButton

Best Java code snippets using android.widget.RadioButton.getLayoutParams (Showing top 2 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: heinrichreimer/android-issue-reporter

private void setOptionUseAccountMarginStart(int marginStart) {
  LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) optionUseAccount.getLayoutParams();
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
    layoutParams.setMarginStart(marginStart);
  } else {
    layoutParams.leftMargin = marginStart;
  }
  optionUseAccount.setLayoutParams(layoutParams);
}
origin: derry/delion

@Override
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
  mRadioGroup.setOrientation(HORIZONTAL);
  for (RadioButton button : mColorModeButtons.values()) {
    ViewGroup.LayoutParams layoutParams = button.getLayoutParams();
    layoutParams.width = 0;
  }
  super.onMeasure(widthMeasureSpec, heightMeasureSpec);
  // If text is wider than button, change layout so that buttons are stacked on
  // top of each other.
  for (RadioButton button : mColorModeButtons.values()) {
    if (button.getLineCount() > 1) {
      mRadioGroup.setOrientation(VERTICAL);
      for (RadioButton innerLoopButton : mColorModeButtons.values()) {
        ViewGroup.LayoutParams layoutParams = innerLoopButton.getLayoutParams();
        layoutParams.width = LayoutParams.MATCH_PARENT;
      }
      break;
    }
  }
  super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
android.widgetRadioButtongetLayoutParams

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

  • Parsing JSON documents to java classes using gson
  • runOnUiThread (Activity)
  • getApplicationContext (Context)
  • getSharedPreferences (Context)
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
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