I have a layout that contains a ScrollView

Inside of that ScrollView, I would like to dynamically add a group of
views as a "package". I know I can do this as single lines, but I have
a complex row made up of several views that I need to add as a group.

What I want is a CheckBox on the left side, three lines of text in the
center, and an image on the right. Let's call that a segment, and I
want multiple segments to be added dynamically to my ScrollView.

I have the "segment" laid out like this:

                <LinearLayout
                        android:id="@+id/segment"
                        android:orientation="horizontal"
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent" >

                        <
                        <CheckBox
                                android:id="@+id/checkbox"
                                android:layout_width="wrap_content"
                                android:layout_height="fill_parent"
                        />
                        <LinearLayout
                                android:id="@+id/text_fields"
                                android:orientation="vertical"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content" >

                                <TextView
                                        android:id="@+id/text_line1"
                                        android:text="TEXT LINE1"
                                        android:textSize="12sp"
                                        android:textColor="#01264F"
                                        android:textStyle="bold"
                                        android:background="#DAE5F0"
                                        android:padding="10dp"
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                </TextView>

                                <TextView
                                        android:id="@+id/text_line2"
                                        android:text="TEXT LINE2"
                                        android:textSize="12sp"
                                        android:textColor="#01264F"
                                        android:textStyle="bold"
                                        android:background="#DAE5F0"
                                        android:padding="10dp"
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                </TextView>

                                <TextView
                                        android:id="@+id/text_line3"
                                        android:text="TEXT LINE3"
                                        android:textSize="12sp"
                                        android:textColor="#01264F"
                                        android:textStyle="bold"
                                        android:background="#DAE5F0"
                                        android:padding="10dp"
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                </TextView>

                        </LinearLayout>

                        <ImageView
                                android:layout_width="wrap_content"

                                android:id="@+id/some_logo"
                                android:src="@drawable/some_logo_small"
                                android:layout_gravity="left|center_vertical"

                                android:id="@+id/imageView1"
                                android:layout_height="wrap_content">
                        </ImageView>

                </LinearLayout>


How can I add multiple segments (my upper LinearView is called a
segment) to the ScrollView?

Thanks!

-- 
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

Reply via email to