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

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -