0

How to make zoomable LinearLayout?

I used this to zoom my layout this worked for click to zoom and not for pinch to zoom and also i want to zoom a view over this layout. That view is returned by canvas method that is used to draw a line over this layout. Now my layout is zooming and not the canvas element. Can someone help me to zoom both the canvas element and the layout. Thanks in advance buddy.

Community
  • 1
  • 1
Ash
  • 33
  • 2
  • 9
  • go this link, this will work [here][1] [1]: http://stackoverflow.com/questions/15849060/how-to-make-zoomable-linearlayout – Azahar Nov 26 '13 at 12:10

1 Answers1

-1

This Answer is to zoom image and content made to load in webview

Copy an Image in Assets and create a file image.html in assets the code will be some what like this

<html>
  <table>
    <tr>
      <td>
        <img src="droid.jpg"  width="304" height="228" alt="Hello">
      </td>
    </tr>
  </table>
</html>

and write the below code in java class

public class MainActivity extends Activity {
    // declare a WebView object first
    WebView mWebView = null;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        // load view
        mWebView = (WebView)findViewById(R.id.webView);
        // (*) this line make uses of the Zoom control
        mWebView.getSettings().setBuiltInZoomControls(true);
        // simply, just load an image
        mWebView.loadUrl("file:///android_asset/image.html");
    }
}

if you want some other option you can go to this link good luck :)

Auto-Droid ツ
  • 1,583
  • 1
  • 17
  • 31