title: Pinching zoom for text view
body: <p>I want to do pinching functionality (zoom in /zoom Out) for text view .</p>
  
  <p>I have already refer to many tutorials but not getting any fruitful ..please help 
    me if any one have done it or Knows how to do it ....</p>
  
  <p>Can I do it also with using button as zoom in and out and/or using 2 finger  pinching ?</p>
  
  <p>any help would be appreciated..
    thanks</p>
  
  <p><strong>not working code</strong>:</p>
  
  <pre><code>  setContentView(R.layout.main);
    mainView =(LinearLayout)findViewById(R.id.linearLayout);
  
    Button buttonZoomOut = (Button)findViewById(R.id.buttonZoomOut);
    Button buttonNormal = (Button)findViewById(R.id.buttonNormal);
    Button buttonZoomIn = (Button)findViewById(R.id.buttonZoomIn);
  
    buttonZoomOut.setOnClickListener(new View.OnClickListener() {    
     public void onClick(View v) {
      zoom(0.5f,0.5f,new PointF(0,0));    
     }
    });
    buttonNormal.setOnClickListener(new OnClickListener() {
  
     public void onClick(View v) {
      zoom(1f,1f,new PointF(0,0));  
     }
    });
    buttonZoomIn.setOnClickListener(new View.OnClickListener() {
  
     public void onClick(View v) {
      zoom(2f,2f,new PointF(0,0));   
     }
    });
   }
  
   /** zooming is done from here */
   public void zoom(Float scaleX,Float scaleY,PointF pivot){
    mainView.setPivotX(pivot.x);
    mainView.setPivotY(pivot.y);  
    mainView.setScaleX(scaleX);
    mainView.setScaleY(scaleY);  
   } 
  </code></pre>