I'm fairly new to android, so don't shoot me right away!
I'm using a linearlayout in android to draw a graph, I'm drawing the graph and set is as background image in a linearlayout.
The linearlayout is child of a relative layout and defined in the layout xml: The relativeLayout contains some other textviews and edittext's as well.
<RelativeLayout
android:id="@+id/rl"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/ll_graph"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:orientation="vertical"
android:layout_below="@+id/etMemo" >
</LinearLayout>
</RelativeLayout>
In OnCreate:
ll_graph = (LinearLayout) findViewById(R.id.ll_graph);
Next in OnStart I want to draw the graph, but at that point the ll_graph has a width and height of 0, and therefore displays nothing. If I put a button on the form to execute the same code, the width and height is as expected and the graph is drawn perfectly. What am I missing here?