2013-03-04 70 views
0

我有一個8000像素長的圖像,我想水平滾動。當我將圖像作爲ImageView插入到Horizo​​ntalScrollView並在物理設備(Samsung galaxy nexus)上運行時,滾動條顯示圖像已加載,但未顯示圖像。一切都在android xml查看器中正確顯示。 這裏是我的horizo​​ntalScrollView XML:ImageView不顯示在Android的Horizo​​ntalScrollView內

<HorizontalScrollView 
    android:id="@+id/horizontalScrollView1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    android:layout_alignParentLeft="true" 
    android:layout_below="@+id/TableRow01" 
    android:scrollbars="horizontal" > 

    <LinearLayout 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" > 

     <ImageView 
      android:id="@+id/imageView1" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_marginBottom="14dp" 
      android:src="@drawable/longimage" /> 
    </LinearLayout> 

</HorizontalScrollView> 

我曾嘗試在其他一些佈局和自身的包裝形象,但沒有在設備上工作。提前致謝。

+1

嘗試使用一些小圖像,你確定你沒有收到任何崩潰日誌? – Triode 2013-03-04 17:09:22

+0

啊謝謝!有一個崩潰日誌:位圖太大,無法作爲紋理上傳。那麼我將如何上傳圖片呢? – user2096732 2013-03-04 21:35:57

回答

0

您可以將imageView的參數更改爲match_parent。

+0

我也試過,以及:/ – user2096732 2013-03-04 17:09:43

相關問題