congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RadioButton.getLayoutParams
Code IndexAdd Tabnine 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)

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
  • requestLocationUpdates (LocationManager)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSharedPreferences (Context)
  • Menu (java.awt)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 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