Please tell me how to click and enlarge the Android image view.

Asked 2 years ago, Updated 2 years ago, 68 views

When you click the image view on the left screen, as shown in the picture, I want to fill up the screen like the picture on the right (like when you click on the image in the photo album) I'm thinking about making another activity and filling it up I don't know how to implement the code. First of all, switching activities to Click-Listener and Intent is unconditionally done, but the code implementation is a question of how to make the image bigger. What should I do?

imageview.setOnClickListener(new View.OnClickListener() {

@Override public void onClick(View arg0) {

We need to implement the code here What should I do?

} });

eclipse imageview

2022-09-22 20:39

1 Answers

Set the image view of the activity to be enlarged to MATCH_PARENT, and when you turn it to int, you can turn it over with the image information and load the image from the activity. Also, see the scaleType property in imageView.


2022-09-22 20:39

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.