Google+

Android4Beginners.com

Apps development for Android step by step

Lessons related to getResources

Lesson 1.3: How to modify TextView in Java code (findViewById, setText and getText methods)

We have already presented some text on the screen using layout XML file. This is recommended approach, but if we want to modify that text we have to use Java.

Read More

Appendix B: Everything about colors in Android

Android uses standard RGB (red, green and blue) color model. Each primary color value is usually represented by hexadecimal number.  At the beginning of such a color definition you have to put a pound character (#).

The simplest is just #RGB format, where #000 is black and #FFF is white. But in this format we have only 16 values per color so it gives 4096 combinations. That’s why #RRGGBB format is mainly used. In this format we have 256 values per primary color, so 16 777 216 colors in total. Black is #000000 and white is #FFFFFF.

Read More