如何实现android zoomview?

如何实现android zoomview?,android,zooming,Android,Zooming,我想实现android zoom视图。 我将jar添加到构建路径。我创建了以下xml: <?xml version="1.0" encoding="utf-8"?> <pl.polidea.view.ZoomView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" &g

我想实现android zoom视图。 我将jar添加到构建路径。我创建了以下xml:

<?xml version="1.0" encoding="utf-8"?>
<pl.polidea.view.ZoomView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

     <ImageView
        android:id="@+id/webcam1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:layout_marginBottom="20dp"
        android:scaleType="matrix" />

    <ImageView
        android:id="@+id/webcam2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:scaleType="matrix" />
</pl.polidea.view.ZoomView>
我做错了什么? 我得到以下错误:

Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class pl.polidea.view.ZoomView

仅仅将jar文件添加到构建路径是行不通的。 您必须转到Order和Export选项卡,检查要包含在类路径中的jar文件。
订单和导出选项卡在project的属性菜单中可用。

仅将jar文件添加到构建路径不起作用。 您必须转到Order和Export选项卡,检查要包含在类路径中的jar文件。
“订单和导出”选项卡在project的“属性”菜单中可用。

我将以下构造函数添加到ZoomView类中,并且它现在至少对ZoomView中的一个imageview起作用

public ZoomView(final Context context, AttributeSet attr) {
     super(context, attr);     
}

我在ZoomView类中添加了以下构造函数,现在它至少对ZoomView中的一个imageview起作用

public ZoomView(final Context context, AttributeSet attr) {
     super(context, attr);     
}

非常感谢。我现在在order and export选项卡中启用了jar文件。但问题仍然存在。zoomview的Xml支持仍在继续。请参考:谢谢。我现在在order and export选项卡中启用了jar文件。但问题仍然存在。zoomview的Xml支持仍在继续。请参考:是的,那是为我做的。是的,那是为我做的。