闪屏ImageView的不显示图像

问题描述:

嗨,大家好我有其中包含一个ImageView的布局的main.xml这个闪屏, 这里是main.xml中的文件闪屏ImageView的不显示图像

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:id="@+id/LinearLayout2" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="vertical" > 
<ImageView 
    android:id="@+id/imageView1" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:src="@drawable/slide11" /> 
</LinearLayout> 

,这里是我的splashscreen.class文件

protected void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.main); 
try { 
      new Handler().postDelayed(new Runnable() { 
      public void run() 
      Intent intent = new Intent(getApplicationContext(),content_activity.class); 
      startActivity(intent); 
      Main.this.finish(); } }, 5000); 
      } catch(Exception e){} 
} 
@Override 
public void onBackPressed() { 

     super.onBackPressed(); 
} } 

当我尝试在我的模拟器一切工作正常,但是当我试图通过调试模式的设备上运行它,我不明白在ImageView的指定的图像,但我得到一个白色的屏幕上运行此为指定的时间量。任何帮助将不胜感激。

//编辑:我重复检查了res/drawable文件夹,我尝试了主要使用png,并给出了一个使用.gif没有在设备上工作。 (设备micromax a110)

+1

检查控制台是否抛出异常? – KCRaju

+0

我得到这个W/OpenGLRenderer(13960):位图太大,无法上传到纹理中,是否有任何限制必须使用的图像的大小? .png一个是1.04mb,jpeg一个是867kb – jayeshkv

+1

看起来像是因为图像的大小,当减少工作! – jayeshkv

看起来,这是因为图像,当减小的工作的大小!

使用此代替您的布局。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:id="@+id/LinearLayout2" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="vertical" 
android:background="@drawable/slide11" > 

Use image as layout background :- 

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:id="@+id/LinearLayout2" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="vertical" 
android:background="@drawable/slide11" 

> 

</LinearLayout> 
+0

尝试过,但我仍然不断获取设备上的白色屏幕 – jayeshkv

+0

为避免白色屏幕在manifest.xml中使用'android:theme =“@ android:style/Theme.Translucent”' – ryderz8