How to create a button with another button


I am trying to create an Android app that you can build a task list in. When you click the "Add New Task" button, it creates a button with a checkbox below. Then if you click it again, it creates another below the previously created one.

The newly created buttons take you to an activity that allows you to enter in your task title, due date for the task and description of the task.

I am new to Android Studio and have only ever used Visual Studio, which is not as complicated as this program.

I know how to create a button with another button using JFrames/JButtons in Java, but not in Android Studio.

I also am not sure how to set it to where each newly created button has its own activity created.

It sounds more like you need to have a new task fragment that you add to your activity in a scrollview layout. Allowing you to manage each task in its own context. Allowing you start a new intent for your activity you want to launch.