Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of ZoomView #1

Open
GoogleCodeExporter opened this issue Mar 31, 2016 · 8 comments
Open

Use of ZoomView #1

GoogleCodeExporter opened this issue Mar 31, 2016 · 8 comments

Comments

@GoogleCodeExporter
Copy link

My question is quite simple, how to ue ZoomView ?

I have put the jar in my buildpath, but after ? 

When I tried this into myview.xml:

        <ZoomView>
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginBottom="5dip"
            android:src="@drawable/plan" />
        </ZoomView>

It crashes.

Original issue reported on code.google.com by [email protected] on 29 Jan 2013 at 9:40

@GoogleCodeExporter
Copy link
Author

01-29 22:33:22.082: E/android.view.InflateException(1449): Caused by: 
java.lang.ClassNotFoundException: android.view.ZoomView in loader 
dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/dat
a/app/com.montpellier.zoo-2.apk]

Original comment by [email protected] on 29 Jan 2013 at 9:43

@GoogleCodeExporter
Copy link
Author

you must specifiy correct class path and proper layout params (zoom view is 
extension of framelayout)

you would also rather use fill_parent instead of wrap_content for zoomed image.

so try doing somethin like this:

<pl.polidea.view.ZoomView
     android:layout_width="fill_parent"
     android:layout_height="fill_parent">
        <ImageView
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_marginBottom="5dip"
            android:src="@drawable/plan" />
 </pl.polidea.view.ZoomView>

Original comment by [email protected] on 5 Mar 2013 at 1:20

@GoogleCodeExporter
Copy link
Author

i am using zoomview.jar file everthing is fine but when i touch edges of layout 
it is automatically zooms in and zoom out how to fix this issue.

Original comment by [email protected] on 7 May 2013 at 11:24

@GoogleCodeExporter
Copy link
Author

Hey,

I added the jar to the buildpath. I created the 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 the following code to my 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 am I doing wrong?
I get the following error:

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

Thank you!


Original comment by [email protected] on 18 May 2013 at 10:13

@GoogleCodeExporter
Copy link
Author

inflating ZoomView from XML is not supported at the moment.
What is exactly in R.layout.zoomable_view? Is this a layout you posted?
If yes, you don't have to put ZoomView again in it. Just place images in 
FrameLayout instead.

Original comment by [email protected] on 29 May 2013 at 10:13

@GoogleCodeExporter
Copy link
Author

Hi.. Thanks for the sharing this useful jar.. It works perfectly... But I need 
to implement zoom and paint in my project.. After zoom the image,  if I m 
trying to paint.. It drags the zoomed view of the image.. Can u share any idea 
to disable the drag view of zooming.. Thanks in advance..

Original comment by [email protected] on 17 Aug 2014 at 4:16

@GoogleCodeExporter
Copy link
Author

Its works perfectly,Thanks a lot 

Original comment by [email protected] on 3 Jun 2015 at 10:17

@GoogleCodeExporter
Copy link
Author

How to reset zoomview ?

Original comment by [email protected] on 8 Jun 2015 at 2:07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant