Closed silviuungureanu closed 6 years ago
Could you tell me how you test your app? What version of Android is your device running? What is your project's target API?
same thing here, I am doing something as simple as this:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageView imageView = (ImageView) findViewById(R.id.imageView2);
imageView.setOnTouchListener(new ImageMatrixTouchHandler(this));
}
// I've tried passing the getApplicationContext() as well...
target: 25 android 5.0
Also, I am trying to do something this simple because the MainActivity.java doesn't display anything when I run that code.. everything compiles fine but the screen is just plain white.. so I decided to just take the piece that I need (pinch and zoom) and implement the viewpager myself
I know this is old, but for anyone looking to resolve this, try using this:
imageView = (ImageView) findViewById(R.id.imageLarge);
imageView.setOnTouchListener(new ImageMatrixTouchHandler(imageView.getContext()));
You indeed need to pass the view's context in order for it to work. I will update the documentation so that it is more clear.
I also solved this issue by setting image view's context but i want to detect the state of image view whether it's zoomed or not in if it is possible
Its not working either way, neither by using view.getContext()
nor by using imageView.getContext()
@Dinesh2411 you should be able to detect this by inspecting the image matrix values.
Closed due to lack of activity
I have integrated the library as in the description and it does not work, unfortunately.