java - How to change the background color for layouts using configuration file in android -


i want change background color layouts dynamically first time only, using configuration file in android file should in assets folder,it can xml file or anything. please me.

if set id layout follows :

<linearlayout android:id="@+id/mylayout"> <linearlayout/> 

then can set background in oncreate this:

mylayout= findviewbyid(r.id.mylayout); mylayout.setbackgroundcolor(color.blue); 

Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

php - Boolean search on database with 5 million rows, very slow -

css - Text drops down with smaller window -