我有一個圖像視圖,我想在其上設置圖像。圖像的大小是7,707,446字節。每當我嘗試設置佈局,應用程序崩潰和錯誤是內存不足的錯誤的。可有人建議我如何解決後援XML是: -如何在圖像視圖中設置大圖像
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/image" >
</RelativeLayout>
</ScrollView>
可以請你分不清什麼是屏幕寬度和iPadwidth – swati
屏幕寬度是根據您使用您的活動,以顯示。設備和ipathwidth女巫圖像設備寬度\ –
通常我創建一個方法女巫還給我新的高度和寬度與imagedrawable爲設置圖像背景.. –