I would like to know how to zoom with your fingers in Android Studio, that is, to do all the layout.xml (or as you call it), since on the internet I have only seen how to zoom in on a image, and I would be interested in zooming the whole screen, approaching the background, the images, the text, etc. If someone can leave some code I'd appreciate it a lot
I leave an example of code that works perfectly to zoom in on an image, and I wanted to know if it can be adapted, with a similar code example to do it in a layout
import uk.co.senab.photoview.PhotoViewAttacher;
public class MainActivity extends AppCompatActivity implements
View.OnClickListener{
PhotoViewAttacher photoViewAttacher;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
imagen=(ImageView)findViewById(R.id.imagen);
photoViewAttacher=new PhotoViewAttacher(imagen);
}
I have tried to give an id to the layout and replace it with the image, that is
layout=(ConstraintLayout)findViewById(R.id.layout);
photoViewAttacher=new PhotoViewAttacher(layout);
But it does not work for me
Greetings