I am trying to change the background of whole screen to white. I doing it by adding by android:background="#ffffff" attribute to linerlayout. but it is not working, i dont know what i am missing ?
http://developer.android.com/reference/android/widget/LinearLayout.html
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:padding="10dip"
android:layout_width="fill_parent" android:layout_height="wrap_content"
**android:background="#ffffff"** >
I also tried to this programtically , something like this
setContentView(R.layout.main);
LinearLayout linLay = (LinearLayout) findViewById(R.layout.main);
linLay.setBackgroundColor(Color.WHITE);
but application throws error
Are you please able to post the complete code necessary to replicate your problem?
This works fine for me:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFF">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With