Advertisement

Android Button Click New Activity Example

Advertisement
  • Yulius Ardian Febrianto

    what if there are two new activity? with two buttons?

    • Yulius, you can just create another button that links to another activity.

      • Yulius Ardian Febrianto

        Case closed thank’s 😀

  • karol3214

    Hello can you explain to me how to add a second button because I have no idea how to do

    • شبير البلوشي

      karol3214 what do you mean by “second button”. you mean two buttons in main activity open two different activities???

  • Nakul

    helloo….
    my question is ,I made 5 activity and 5 button for each, but i want to make only 1 java/class file insteade of 5..any 1 help me how can i code all in 1 java file……….

  • sharan benipal

    how to add intent in imageadapter class ….

  • deepika

    if there are 5 buttons in the same activity, then how should I add action for each button in the same java file

    • Sukrit Mehta

      Make 5 buttons in the XML file..Then in the New Activity set separately onClickListeners on 5 buttons and perform the required tasks.

  • varun