Android TextView setTextSize incorrectly increases text size -
this question has answer here: textview.settextsize behaves abnormally - how set text size of textview dynamically different screens 6 answers this in extension of textview. gettextsize() , settextsize() not overridden, not extend methods. programming in 1.6, api level 4. the loop in code causes size multiplied 1.5 every time iterates, e.g. if size reads 200 gettextsize , settextsize(size) called, gettextsize called again reads 300. public void shrinktest() { float size = this.gettextsize(); while (size > 8) { this.settextsize(size); size = this.gettextsize(); } } why this? heh, mixed units problem. seems little counterintuitive, it's easy fix. default method settextsize(float) assumes you're inputting sp units (scaled pixels), while gettextsize() method returns exact pixel size. you can fix using altern...