


Navigate to the app > res > layout > activitymain.xml and add the below code to that file. What I'm trying to do now is update the original TextView string with every button click according to the button click.I have an idea of how to do it with numbers like this: tView = (TextView) findViewById(R.id.textView1) Ĭlickhere = (Button) findViewById(R.id.button1) ĬtOnClickListener(new View. Before Implementing the following code first create a new project in Android Studio, go to File > then go to New > then select the New Project. Step 2: Working with the activitymain.xml file.

I have a sample activity to display three diagrams in an array on button click.
