Tabnine Logo
RadioButton.setTextSize
Code IndexAdd Tabnine to your IDE (free)

How to use
setTextSize
method
in
android.widget.RadioButton

Best Java code snippets using android.widget.RadioButton.setTextSize (Showing top 8 results out of 315)

origin: mvpleung/SwitchButton

private RadioButton createRadioView() {
  RadioButton mRadioButton = new RadioButton(getContext(), null, mRadioStyle > 0 ? mRadioStyle : android.R.attr.radioButtonStyle);
  if (mRadioStyle == 0) {
    mRadioButton.setGravity(Gravity.CENTER);
    mRadioButton.setEllipsize(TruncateAt.END);
  }
  if (mTextColor != null)
    mRadioButton.setTextColor(mTextColor);
  if (textSize > 0)
    mRadioButton.setTextSize(textSize);
  return mRadioButton;
}
origin: GeoODK/collect

rb.setOnCheckedChangeListener(this);
rb.setText(label);
rb.setTextSize(mAnswerFontsize);
mButtons.addView(rb);
origin: GeoODK/collect

RadioButton r = new RadioButton(getContext());
r.setText(prompt.getSelectChoiceText(mItems.get(i)));
r.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mAnswerFontsize);
r.setTag(Integer.valueOf(i));
r.setId(QuestionWidget.newUniqueId());
origin: GeoODK/collect

r.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mAnswerFontsize);
r.setTag(Integer.valueOf(i));
r.setId(QuestionWidget.newUniqueId());
origin: vir56k/demo

  /**
   * 创建子 tab
   *
   * @param context
   * @param id
   */
  public static RadioButton creatTabItem(Context context, int id, String text) {
    final int width = DensityUtil.dip2px(context, 80);
    final int height = DensityUtil.dip2px(context, 46);
    final int padding = DensityUtil.dip2px(context, 3);

    RadioButton button;
    button = new RadioButton(context);
    button.setId(id);
//        button.setWidth(width);
//        button.setHeight(height);
    button.setText(text);
    button.setLayoutParams(new LinearLayout.LayoutParams(width, height));
    button.setHeight(height);
    button.setBackgroundResource(R.drawable.tab_item_bg_selector);
    button.setButtonDrawable(context.getResources().getDrawable(android.R.color.transparent));
    button.setGravity(Gravity.CENTER);
    button.setTextColor(context.getResources().getColorStateList(R.color.tab_item_font_color_selector));
    button.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
    button.setPadding(0, 0, 0, padding);
    return button;
  }
}
origin: linglongxin24/ARDevelopDemo

newRadioButton.setTextSize(mEntriesTextSize);
newRadioButton.setPadding(mEntriesSidesPadding,
  mEntriesUpDownRadioPadding, mEntriesSidesPadding,
origin: termux/termux-api

@Override
RadioGroup createWidgetView(AppCompatActivity activity) {
  radioGroup = new RadioGroup(activity);
  radioGroup.setPadding(16, 16, 16, 16);
  LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
  layoutParams.topMargin = 32;
  layoutParams.bottomMargin = 32;
  String[] values = getInputValues(activity.getIntent());
  for (int j = 0; j < values.length; ++j) {
    String value = values[j];
    RadioButton button = new RadioButton(activity);
    button.setText(value);
    button.setId(j);
    button.setTextSize(18);
    button.setPadding(16, 16, 16, 16);
    button.setLayoutParams(layoutParams);
    radioGroup.addView(button);
  }
  return radioGroup;
}
origin: Odoo-mobile/framework

private void createRadioGroup() {
  final LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT,
      LayoutParams.WRAP_CONTENT);
  if (mRadioGroup == null) {
    mRadioGroup = new RadioGroup(mContext);
    mRadioGroup.setLayoutParams(params);
  } else {
    removeView(mRadioGroup);
  }
  mRadioGroup.removeAllViews();
  mRadioGroup.setOnCheckedChangeListener(this);
  for (ODataRow label : items) {
    RadioButton rdoBtn = new RadioButton(mContext);
    rdoBtn.setLayoutParams(params);
    rdoBtn.setText(label.getString(mModel.getDefaultNameColumn()));
    if (textSize > -1) {
      rdoBtn.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
    }
    if (appearance > -1) {
      rdoBtn.setTextAppearance(mContext, appearance);
    }
    rdoBtn.setTextColor(textColor);
    mRadioGroup.addView(rdoBtn);
  }
  addView(mRadioGroup);
}
android.widgetRadioButtonsetTextSize

Popular methods of RadioButton

  • setChecked
  • isChecked
  • setText
  • setOnClickListener
  • setOnCheckedChangeListener
  • <init>
  • getId
  • setId
  • getText
  • setEnabled
  • setVisibility
  • setButtonDrawable
  • setVisibility,
  • setButtonDrawable,
  • setTag,
  • setTextColor,
  • setLayoutParams,
  • setBackgroundDrawable,
  • getTag,
  • setBackgroundColor,
  • onDraw

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • Menu (java.awt)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Permission (java.security)
    Legacy security code; do not use.
  • JOptionPane (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • From CI to AI: The AI layer in your organization
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