I couldn’t find any decals I liked, so I bought some black chalkboard paint and painted the old computer I use as a Linux laptop. With a piece of chalk, I can now have a different logo on it whenever I want a new one.
Android FAQ: How can I create a
Color from a hexadecimal color string in Android?
The Android Color.parseColor method
Solution: Use the Android Color.parseColor method, like this:
int color = Color.parseColor("#519c3f");
I just used it like this in my code, where I directly set the Paint color:
Android FAQ: How do I draw a rectangle in Android?
To draw a rectangle in Android you’ll need to create your own
View, i.e., a class that extends the Android
View class. For example, this
CustomView shows how to extend a
View and then use the
Paint classes along with the
onDraw method to draw a rectangle:
A few days ago I found this black paint that “turns any surface into a chalkboard.” I’ve been painting the backs of some cheap cabinets, whose backs are now exposed after I moved some furniture around. If you know me, you know I like to have surfaces I can write on. :)
As the ExtremeTech article states, “The curvy masterpiece, called the Vision G-Code, is covered in special multi-voltaic paint that can generate fuel from both solar and wind energy.”
This code may not make much sense without seeing the end result, but ... the following source code shows how to draw lines and arcs in Scala and Java: