U can use TextPaint class ,and the method in this class is measureText, then
get one char width!
Any question u can post topic in http://androidos.cc/bbs,
、
你可以使用 TextPaint 类中的 measureText方法来测量单个字符的宽度!
如果有问题,可以在http://androidos.cc/bbs上发帖,我将第一时间回复你!
2009/1/6 Xiongzh
>
> Hi all,
>
> I'll like t
The TextPaint worked well to measure the text length in pixel.
I've implemented my ScrollTextView successfully.
Here's my codes to calculate the scrolling length.
Just for your information.
private void calculateScrollingLen() {
TextPaint tp = getPaint();
R
On Tue, Jan 6, 2009 at 7:09 AM, Xiongzh wrote:
> Say, my font size of the text in TextView is 20.5px.
> It doesn't mean that every character of the text occupies 20.5px in
> the screen, does it?
>
certainly not, the "text size" is only a notional unit. the actual number of
pixels
covered by the
I've shared my ScrollTextView at
http://bear-polka.blogspot.com/2009/01/scrolltextview-scrolling-textview-for.html
Comments are welcomed
On Jan 6, 8:36 pm, Xiongzh wrote:
> The TextPaint worked well to measure the text length in pixel.
> I've implemented my ScrollTextView successfully.
> Here's
4 matches
Mail list logo