Setting Up the DragAndDraw Project

Create a new project named DragAndDraw with API 21 as the minimum SDK and using AndroidX artifacts. Start the project without an activity, then create an empty launcher activity named DragAndDrawActivity.

DragAndDrawActivity will be a subclass of AppCompatActivity and will host a BoxDrawingView, the custom view that you are going to write. All of the drawing and touch-event handling will be implemented in BoxDrawingView.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.91.176.3