Tabnine Logo
RadioButton.onMeasure
Code IndexAdd Tabnine 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)

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

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JCheckBox (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top plugins for Android Studio
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