How to Use Customized fonts on Canvas(3 Questions included inside)
- How to use Customized fonts on Canvas?
I have customized view (PIECHART DRAWN ON CANVAS) on left side of the screen and list view on right of the screen. When ever I touched on the canvas list view values has to be changed. is it possible. My listview is in Activity A class.And view is in B class.
I have piechart with n no of arcs. On tapping on that i have to known which arc is tapped. Is there any formula for it. (Like for rectangle basing on left,top and wi开发者_StackOverflowdth hegiht we can check.)
- In the drawText function in the canvas you have to provide a Paint object. Well the paint object has a function that accepts a typeface and it is called setTypeface(). Look more into that function and its uses and perhaps this tutorial and you will see that it is rather straightforward to use any font that you like in Canvas.
My advice would be to make questions 2 and 3 separate questions in their own right and improve your explanation of what you want to happen.
精彩评论