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

  • Making http requests using okhttp
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • onRequestPermissionsResult (Fragment)
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JPanel (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now