8
Android Paint: .measureText () vs .getTextBounds ()
Sto misurando il testo usando Paint.getTextBounds(), dal momento che mi interessa ottenere sia l'altezza che la larghezza del testo da rendere. Tuttavia, il testo reale reso è sempre un po 'più ampio di quello .width()delle Rectinformazioni riempite da getTextBounds(). Con mia sorpresa, ho testato .measureText()e ho scoperto che restituisce un …