hello,
I am trying to reproduce the behaviour of this simple layout :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#0000ff"/>
a linearlayout with blue background taking all the available space.
I can't understand why this java code doesn't work ? the screen stays black. can somebody advise ?
LinearLayout layout = new LinearLayout(this, null);
layout.setBackgroundColor(0xff);
layout.setOrientation(LinearLayout.VERTICAL);
layout.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.FILL_PARENT));
setContentView(layout);
thanks.