Android Open Source - TouchImageView Mirroring Example Activity






From Project

Back to project page TouchImageView.

License

The source code is released under:

opyright (c) 2012 Michael Ortiz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Softw...

If you think the Android project TouchImageView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.ortiz.touch;
/*w  w w .j a v a  2  s  .com*/
import android.app.Activity;
import android.os.Bundle;

import com.example.touch.R;
import com.ortiz.touch.TouchImageView.OnTouchImageViewListener;

public class MirroringExampleActivity extends Activity {
  
  TouchImageView topImage;
  TouchImageView bottomImage;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_mirroring_example);
    topImage = (TouchImageView) findViewById(R.id.topImage);
    bottomImage = (TouchImageView) findViewById(R.id.bottomImage);
    
    //
    // Each image has an OnTouchImageViewListener which uses its own TouchImageView
    // to set the other TIV with the same zoom variables.
    //
    topImage.setOnTouchImageViewListener(new OnTouchImageViewListener() {
      
      @Override
      public void onMove() {
        bottomImage.setZoom(topImage);
      }
    });
    
    bottomImage.setOnTouchImageViewListener(new OnTouchImageViewListener() {
      
      @Override
      public void onMove() {
        topImage.setZoom(bottomImage);
      }
    });
  }
}




Java Source Code List

com.ortiz.touch.ExtendedViewPager.java
com.ortiz.touch.MainActivity.java
com.ortiz.touch.MirroringExampleActivity.java
com.ortiz.touch.SingleTouchImageViewActivity.java
com.ortiz.touch.SwitchImageExampleActivity.java
com.ortiz.touch.SwitchScaleTypeExampleActivity.java
com.ortiz.touch.TouchImageView.java
com.ortiz.touch.ViewPagerExampleActivity.java