Hello!

I'm working with some friends on an application, we're all beginners
but so far it's going pretty well. Unfortunately we've hit a
roadblock, and since our native language isn't English we don't know
if we're searching for the right tags, because we're not finding
anything on this subject.

The following is a part of one of our xmlfiles:

    <ScrollView    <!-- Scrollviewcontainer -->
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_above="@+id/menu"
        android:layout_below="@id/title_bar"
        android:layout_marginTop="15dp" >

        <LinearLayout    <!-- Itemcontainer -->
            android:id="@+id/mygames_content"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp"
            android:orientation="vertical" >

            <RelativeLayout    <!-- Item -->
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="#f4f4f4"
                android:padding="10dp"
                android:layout_marginBottom="10dp" >

                <TextView
                    android:id="@+id/title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Fotbolls EM 2012"
                    android:textColor="#626262"
                    android:textSize="17dp"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/people"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/title"
                    android:text="23 deltagare"
                    android:textColor="#aeaeae"
                    android:textSize="15dp" />

                <TextView
                    android:id="@+id/rounds"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/people"
                    android:text="12 omgångar spelade"
                    android:textColor="#aeaeae"
                    android:textSize="15dp" />

                <TextView
                    android:id="@+id/time"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/rounds"
                    android:text="2012-04-18 till 2012-06-18"
                    android:textColor="#aeaeae"
                    android:textSize="15dp" />

                <ImageView
                    android:src="@drawable/proceed_button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:layout_centerVertical="true" />
            </RelativeLayout>

        </LinearLayout>
    </ScrollView>

As you can see, there's an Item. Let's say we have an ArrayList or
something with some (let's say 50) objects in, and we want to make one
item per object in the list, gathering info from the object and using
that info in the TextView's. We also want the ImageView to have an
OnClickListener, but we think we know how to do that. How do we do
this in Java? We can't find any tutorials or anything on it.. We'd
greatly appreciate if you would point us in the right direction,
whether it's a tutorial or if you could give us some "basecode" to
work of!

Thanks in advance!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to