This is my xml code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/blue"
android:gravity="center">
Is possible to set color from my Activity file?
For example I can do that for a button:
ImageButton x = (ImageButton) this.findViewById(R.id.btn1);
x.setBackgroundColor(color);
Yes, you can do it by
In XML file :