2012-07-19 46 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>