我正在使用一个应用程序,有手机肖像和平板电脑的肖像和风景。然而,我最近在横向和纵向模式下为闪屏添加了一个视图,tablet中的横向和纵向模式都在拉取mdpi图像而不是xhdpi,不确定为什么会发生这种情况,有什么线索吗?下面是我的xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/login_bg"
android:orientation="vertical"
android:gravity="center" >
<ImageView
android:id="@+id/image"
android:layout_width="750dp"
android:layout_height="wrap_content"
android:layout_marginBottom="50dp"
android:layout_weight="0.36"
android:paddingLeft="100dp"
android:paddingRight="100dp"
android:src="@drawable/splash_logo" />
</LinearLayout>发布于 2013-10-22 01:35:16
这是一个愚蠢的修复方法,但是你确定你的平板电脑是xhdpi吗?我之所以这么说,是因为我用来测试的平板电脑实际上是ldpi,而我只是假设它是xhdpi。
你可以尝试的另一件事是创建一个新的可绘制文件夹drawable-xlarge,它基于屏幕大小而不是像素密度。
https://stackoverflow.com/questions/19500909
复制相似问题