I need to display a timer, and I need the style of numbers to be like many hours. Like this
So, is it possible to set a similar style to numbers using Android tools? Or only if you prepare and draw the images for each digit yourself?
Create the assets / fonts folder and put them there in ttf format
Typeface.createFromAsset(getAssets(),"fonts/myFont.ttf");
Apply
TextView.setTypeface()
I think it will be much faster and easier to draw these numbers in Photoshop (any other favorite editor). Only 10 digits and a colon. (although it is better to draw a colon on a substrate - that is, 10 digits and a substrate). This will give the advantage that in the future you can simply add two pictures (numbers can be drawn on one picture) and get a new style.
Moreover, using the built-in drawable (shape) tools, it is possible to build all these figures of figures on the basis of xml - they will scale well and colorize.
Source: https://ru.stackoverflow.com/questions/210378/
All Articles