pixelformat

Android TextView setTextSize incorrectly increases text size [duplicate]

安稳与你 提交于 2019-11-28 07:08:46
This question already has an answer here: TextView.setTextSize behaves abnormally - How to set text size of textview dynamically for different screens 7 answers This is in an extension of TextView. getTextSize() and setTextSize() are not overridden, I do not extend those methods. Programming in 1.6, API level 4. The loop in this code causes size to be multiplied by 1.5 every time it iterates, e.g. if size initially reads 200 from getTextSize , then setTextSize(size) is called, getTextSize called again reads back 300. public void shrinkTest() { float size = this.getTextSize(); while (size > 8)

Android TextView setTextSize incorrectly increases text size [duplicate]

拟墨画扇 提交于 2019-11-27 01:44:23
问题 This question already has an answer here: TextView.setTextSize behaves abnormally - How to set text size of textview dynamically for different screens 7 answers This is in an extension of TextView. getTextSize() and setTextSize() are not overridden, I do not extend those methods. Programming in 1.6, API level 4. The loop in this code causes size to be multiplied by 1.5 every time it iterates, e.g. if size initially reads 200 from getTextSize , then setTextSize(size) is called, getTextSize