2012-09-30 98 views
0

我試圖讓一個大的圖像視圖滾動使用靜態背景圖像。 問題我面臨的是,有很多的來臨圖像視圖上方的自由空間,我必須向下滾動才能看到我的形象。安卓:滾動型問題

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:background="@drawable/background_mdpi" 
    android:gravity="top" 
    android:orientation="vertical" > 

    <LinearLayout 
     android:layout_width="fill_parent" 
     android:layout_height="match_parent" 
     android:layout_margin="11dp" 
     android:gravity="top" 
     android:background="@drawable/panel" > 

     <ScrollView 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      > 

      <ImageView 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_gravity="top" 
       android:src="@drawable/help_screen" /> 
     </ScrollView> 
    </LinearLayout> 

</LinearLayout> 

如何擺脫這個額外的空間,看到我的圖像,並將它向下滾動,因爲它是長圖像。

感謝 阿比納夫·特亞吉

+0

看看安卓scaleType – Simon

+0

在其佈局把這個? –

+0

謝謝...:d 用它裏面的ImageView與價值= fitStart –

回答

0

正如西蒙說:

我用的android:scaleType = 「fitStart」 在我的ImageView,這解決了我的問題