如何显示大的png文件并在其中滚动?

use*_*076 0 android android-emulator

我有一个很大的Png图像文件,我想像在WebView中一样显示和滚动它。当我将活动与图像文件一起加载到ImageView中时,图像显示在屏幕中,但太小而无法读取。我想一旦图像达到正常大小,缩放控件就会有所帮助。我尝试在WebView中使用图像,但我不希望显示网址。

Ric*_*ich 5

我用TableLayout做过类似的事情。我将其包装在一个嵌套在Horizo​​ntalScrollView中的ScrollView中,并且当TableLayout占用的空间超过屏幕上的容纳空间时,用户可以在所有方向上滚动。我想这也可以与ImageView一起使用。像这样:

    <HorizontalScrollView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
        <ScrollView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">
            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />
        </ScrollView>
    </HorizontalScrollView>
Run Code Online (Sandbox Code Playgroud)