Skip to content

Instantly share code, notes, and snippets.

View haroldolivieri's full-sized avatar
🏠
Working from home

Haroldo Olivieri haroldolivieri

🏠
Working from home
  • Skyscanner
  • London
View GitHub Profile
@haroldolivieri
haroldolivieri / ResizableTextView.java
Last active May 3, 2016 23:45
A resizable textview with animation that depends on screen width and decreases in relation to stepTextSize attribute
public class ResizableTextView extends TextView {
private final float mMaximumTextSize;
private final float mMinimumTextSize;
private final float mStepTextSize;
private final Paint mTempPaint = new TextPaint();
private final Rect mTempRect = new Rect();
private int mWidthConstraint = -1;