On Feb 4, 3:56 am, julz <[email protected]> wrote:
> Hey skink,
> I'm new to Android, could give an example on how to use
> android.text.Layout class?
> I have something like this in my code:
>
>  String text = selectedMapLocation.getDescription()+"\n"+"Published:
> "+selectedMapLocation.getDate();
>  canvas.drawText(text,infoWindowOffsetX+10,infoWindowOffsetY
> +15,getTextPaint());
>
> It doesn't wrap at all :(
> Thanks
> Julz

yes, it shouldn't wrap
Canvas#drawText() draws single line

StaticLayout.draw() is what you want to draw wrapped lines

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to