html - Android - why are colors, font sizes in extra files -


i new in android designing, need advice. in html can insert necessary settings (font size, colors, padding, margin ...) css. prefer work styles, dont understand why in android development use files colors, font sizes. there meaning / advantage of it? example? thanx.

in android, recommended use res/values/colors.xml colors, res/values/styles.xml styling of layout elements , res/values/themes.xml themes of used in app.

the #1 reason of doing going use same colors in lots of different places of app. , placing them res/values/colors.xml let change color , automatically changed on app (as opposed changing every occurrence of color manually)

for example, add color colors.xml

<color name="grey">#eeeeee</color> 

and use in xml

android:textcolor="@color/grey" 

then, if need change grey color shade or yet different color, don't need in in every resource file use color.

just change in colors.xml.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -