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

How to use
onMeasure
method
in
android.widget.RadioButton

Best Java code snippets using android.widget.RadioButton.onMeasure (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: AriesHoo/UIWidget

@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
  if (delegate != null && delegate.getWidthHeightEqualEnable() && getWidth() > 0 && getHeight() > 0) {
    int max = Math.max(getWidth(), getHeight());
    int measureSpec = MeasureSpec.makeMeasureSpec(max, MeasureSpec.EXACTLY);
    super.onMeasure(measureSpec, measureSpec);
    return;
  }
  super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
origin: JackWHLiu/jackknife

@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
  super.onMeasure(widthMeasureSpec, heightMeasureSpec);
  int iconSide = Math.min(getMeasuredWidth() - getPaddingLeft()
      - getPaddingRight(), getMeasuredHeight() - getPaddingTop()
      - getPaddingBottom() - mTextRect.height());
  int left = getMeasuredWidth() / 2 - iconSide / 2;
  int top = (getMeasuredHeight() - mTextRect.height()) / 2 - iconSide / 2;
  int right = left + iconSide;
  int bottom = top + iconSide;
  mIconRect.set(left, top, right, bottom);
}
android.widgetRadioButtononMeasure

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

  • Reading from database using SQL prepared statement
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getSharedPreferences (Context)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • JLabel (javax.swing)
  • JPanel (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
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