PERFECT!
The final main.xml is:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
        <ImageView
           android:layout_width="fill_parent"
           android:layout_height="fill_parent"
           android:scaleType="center"
           android:src="@drawable/sun"
        />
</LinearLayout>

Thanks to mathiastck and Mark Murphy!





On 12 Giu, 00:51, Mark Murphy <[EMAIL PROTECTED]> wrote:
> Alberto wrote:
> > Hi mathiastck!
> > I just want to put a small image in the center of the screen.
> > I tried to do what you wrote and so I changed my main.xml into:
>
> > <?xml version="1.0" encoding="utf-8"?>
> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> > android"
> >     android:orientation="vertical"
> >     android:layout_width="fill_parent"
> >     android:layout_height="fill_parent"
>
> >         <ImageView
> >            android:layout_width="wrap_content"
> >            android:layout_height="wrap_content"
> >            android:scaleType="CENTER"
> >            android:src="@drawable/sun"
> >         />
> > </LinearLayout>
>
> Try making android:layout_width and android:layout_height each be
> fill_parent in the ImageView.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Warescription: All titles, revisions, & ebook formats, just $35/year

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to