как отобразить изображение в центре экрана?

Я создал приложение для создания каруселей, оно работает нормально. Я хочу показать один логотип по умолчанию в центре экрана. поэтому я пробовал много способов, пожалуйста, помогите мне.

Это мой снимок экрана: enter image description here

Я хочу показать один логотип в центре дизайна карусели.

Это мой исходный код xml:

>

<LinearLayout
    android:layout_weight="0.5"
    android:padding="5dip"
    android:gravity="top"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" 
    >
        <com.globems.controls.Carousel
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:id="@+id/carousel"  
            pj:UseReflection="true"
            pj:Items="@array/entries"
            pj:Names="@array/names" 
            pj:SelectedItem="0"
            android:animationDuration="200"
        />    
         <ImageView
    android:id="@+id/imageView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/ic_launcher" />

</LinearLayout>     

в этом коде я использую imageview для отображения логотипа, но он не работает.

Обновлен xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:pj="http://schemas.android.com/apk/res/com.globems.main"
    xmlns:bm="com.carousel.main"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background ="@drawable/blue3"

    >

    <RelativeLayout
        android:layout_weight="0.5"
        android:padding="5dip"
        android:gravity="top"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" 
        >
            <com.globems.controls.Carousel
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:id="@+id/carousel"  
                pj:UseReflection="true"
                pj:Items="@array/entries"
                pj:Names="@array/names" 
                pj:SelectedItem="0"
                android:animationDuration="200"
            />    
        <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/ic_launcher"
        android:centerinHorizontal="true"
        />

    </RelativeLayout>       
</RelativeLayout>
5
задан balaji 12 May 2012 в 12:46
поделиться