Hello,
I have an ImageView and a TextView which I want to have in one line
and center it on the screen. Unfortunatelly with my code the Textview
is not displayed but the Image is centered.

                        <LinearLayout 
xmlns:android="http://schemas.android.com/apk/
res/android"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:layout_gravity="center"
                        >
                                <RelativeLayout 
xmlns:android="http://schemas.android.com/apk/
res/android"
                                android:layout_width="wrap_content"
                                android:layout_height="fill_parent"
                                >
                                <ImageView
                                android:src="@drawable/thumbup"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:layout_gravity="center"
                                />
                                </RelativeLayout>
                                <TextView
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:layout_gravity="center"
                                />
                        </LinearLayout>

I suppose it is because I have "fill_parent" in the ImageView, but
whenever I replace that with "wrap_content" nothing will be centered.

Can somebody please help me!?

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