2012-07-19 48 views
0

我的应用程序包含xhdpi设备闪屏(1230x720 50px的状态栏)的。在三星银河s2,s3上,飞溅图像充满整个屏幕,看起来不错。但是,在星系连线上,导航栏似乎高90-100px,飞溅图像变得太瘦。由于所有这些设备都是xhdpi,我该如何解决星系连接显示完整飞溅图像的问题?的Galaxy Nexus的切断闪屏图像,因为导航栏

我已经想过了几个选项。 1 - 的SYSTEM_UI_FLAG_HIDE_NAVIGATION标志一定会用一些变通的工作,但我的应用程序运行时关闭的2.3.4所以标记是找不到的。

2-图像目前并不坏,但如果我能至少应启动画面中居中,那么这将是罚款。

谢谢。

编辑:这里是我的启动画面XML

<?xml version="1.0" encoding="utf-8"?> 
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent"> 

    <ImageView android:id="@+id/splash_image_view" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
      android:layout_gravity="top" 
      android:scaleType="fitStart" 
      android:gravity="top"/> 

    <ProgressBar android:id="@+id/progressBar" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:layout_gravity="center_horizontal|top" 
      android:progress="0" 
      style="?android:attr/progressBarStyleHorizontal" />  
</FrameLayout> 

答:

我想通了通过进入API文档,并使用硬编码int值,而不是SYSTEM_UI_FLAG_HIDE_NAVIGATION标志。

的代码只是0X2(2)

+0

如果你要回答自己的问题,请把它的答案领域,而不是使一个编辑到你自己的问题。 – Brad 2012-07-20 00:25:06

+0

我不能,因为我只有1个代表 – kevinl 2012-07-21 05:49:44

+0

我会在这种情况下做出回答。 :) – Brad 2012-07-22 23:49:39

回答

0

按照该OP的编辑:

<?xml version="1.0" encoding="utf-8"?> 
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent"> 

    <ImageView android:id="@+id/splash_image_view" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
      android:layout_gravity="top" 
      android:scaleType="fitStart" 
      android:gravity="top"/> 

    <ProgressBar android:id="@+id/progressBar" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:layout_gravity="center_horizontal|top" 
      android:progress="0" 
      style="?android:attr/progressBarStyleHorizontal" />  
</FrameLayout>