【发布时间】:2016-12-16 16:36:18
【问题描述】:
我正在为我的应用程序设计一个启动画面,但我用于它的图像没有正确显示。我附上了我正在使用的图片以及它是如何在此处显示的,以及初始屏幕的 .xml 文件的代码。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#00abd4" >
<ImageView
android:id="@+id/imgLogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/logo1" />
【问题讨论】:
-
尝试将
android:layout_width和android:layout_height设置为match_parent。 -
你在哪个drawable文件夹里?
-
@Stefan drawable里面有一个文件夹,里面有4种尺寸的图片。
-
@Lal 也没有使用它
-
在 mdpi - hdpi - xhdpi - xxhdpi 中?因为如果你只使用默认的可绘制地图,它会被缩放,可能太大
标签: android android-layout splash-screen