我有一个全屏幕背景图片RelativeLayout.和其他图像(100x100)ImageView.
我想放在ImageView中心屏幕.但我的图像显示在左上方.
问题是什么?
XML
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/fondo_inicio" >
<ImageView android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center"
android:gravity="center"
android:background="@drawable/icono_inicio"/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)