Toggle Buttons Tutorial - Android Studio Tutorials

Create New Project

  • Application Name : Toggle Button Example
  • Company Name : tutorialscafe.com (this will make the package name : com.tutorialscafe.togglebuttonexample)
  • Project Location : C:\Users\USER\AndroidStudioProjects\ToggleButtonExample
  • Select the Minimum SDK for you app:
    • Check the Phone and Tablet option if you are going to create app for mobile and Tab
  • Add an activity to Mobile : slect an empty activity template
  • Name your activity and layout file
  • Click on finish Button (it will take some time to finish the Gradle Build)

Create XML

  • Click on the Project Tab to open the project files
  • Navigate to app > res > layout > activity_main.xml in project column
  • place that code in there
  • Create JAVA

  • Click on the Project Tab to open the project files
  • Navigate to app > java > Package Name > MainActivity.java in project column
  • place that code in there
  • Run App

  • Start Emulator by clicking on the AVD Manager
  • Start Emulator
  • Click on the RUN icon or press SHIFT + F10
  • Comments

    Popular posts from this blog

    Android Call Blocker - Android Studio Tutorials

    Radio Buttons Tutorial - Android Studio Tutorials