0

我想在某个布局上显示一个 ImageView,但我不能以正确的方式做到这一点。我的图像非常宽,我想将其高度拉伸到屏幕上,但宽度不应拉伸屏幕的宽度。我的 ImageView(实际上是扩展 ImageView 的类)是智能的,因此我可以通过拖动来移动它。我不想使用Horizo​​ntalScrollView,因为当我拖动图像时,onDrag事件被父级(Horizo​​ntalScrollView)拦截,而不是我的ImageView。

任何帮助,将不胜感激。提前致谢。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >        

        <pl.tripassistant.util.PhotoView
            android:id="@+id/snoop"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:adjustViewBounds="true"
            android:clickable="true"
            android:scaleType="fitXY" />
</LinearLayout>
4

0 回答 0