29.18 A Pinch Gesture Example Project
Select the Create New Project quick start option from the welcome screen and, within the resulting new project dialog, choose the Empty Activity template before clicking on the Next button.
Enter PinchExample into the Name field and specify com.ebookfrenzy.pinchexample as the package name. Before clicking on the Finish button, change the Minimum API level setting to API 26: Android 8.0 (Oreo) and the Language menu to Java. Convert the project to use view binding by following the steps in 11.8 Migrating a Project to View Binding.
Within the activity_main.xml file, select the default TextView object and use the Attributes tool window to set the ID to myTextView.
Locate and load the MainActivity.java file into the Android Studio editor and modify the file as follows:
package com.ebookfrenzy.pinchexample;
.
.
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.ScaleGestureDetector...