If you want to set through xml, then you need to do as below:
android:background="@android:color/white"
in case if you decide to use android's default color code or if you have colors specified in colors.xml
, then use
android:background="@colors/white"
If you want to do programmatically, then do:
linearlayout.setBackgroundColor(Color.WHITE);
.
stackoverflow.comm
No comments:
Post a Comment