zooming - How to implement the android zoomview? -
i want implement android-zoom-view (https://code.google.com/p/android-zoom-view/). added jar buildpath. created following 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> and added following code activity:
view v = ((layoutinflater) getsystemservice(context.layout_inflater_service)) .inflate(r.layout.zoomable_view, null, false); v.setlayoutparams(new linearlayout.layoutparams( layoutparams.fill_parent, layoutparams.fill_parent)); zoomview = new zoomview(this); zoomview.addview(v); linearlayout main_container = (linearlayout) findviewbyid(r.id.linearlayout1); main_container.addview(zoomview); what doing wrong? following error:
caused by: android.view.inflateexception: binary xml file line #2: error inflating class pl.polidea.view.zoomview
i added following constructor zoomview class , works @ least 1 imageview in zoomview.
public zoomview(final context context, attributeset attr) { super(context, attr); }
Comments
Post a Comment