Take a look at LayoutInflater: http://developer.android.com/reference/android/view/LayoutInflater.html
It might be easier than building all these views from code, but still you can inject the inflated view hierarchy into an existing layout.
-- Kostya 17.08.2010 13:41, CMF пишет:
I have a layout xml . I would like to do that in java programming. Can anybody help me? <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/rl"> <TextView android:id="@+id/tv1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:textColor="#FFFFFF" /> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_toLeftOf="@id/tv1" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/tv1" android:textColor="#FFFFFF" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/tv2" android:textColor="#FFFFFF" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/tv3" android:textColor="#FFFFFF" /> </LinearLayout> </RelativeLayout>
-- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

