Open olsisaqe opened 5 years ago
Try this
line1Size = a.getDimensionPixelSize(R.styleable.StackedTextView_line1_textSize, 0); line2Size = a.getDimensionPixelSize(R.styleable.StackedTextView_line2_textSize, 0);
if (line1Size > 0) { holdr.textLine1.setTextSize(TypedValue.COMPLEX_UNIT_PX, line1Size); } if (line2Size > 0) { holdr.textLine2.setTextSize(TypedValue.COMPLEX_UNIT_PX, line2Size); }
If you try to set text size with custom attribute the end result is an extremely large text: