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

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

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

  9. Start Emulator by clicking on the AVD Manager
  10. Start Emulator
  11. Click on the RUN icon or press SHIFT + F10
  12. Comments

    Popular posts from this blog

    Android Call Blocker - Android Studio Tutorials

    Radio Buttons Tutorial - Android Studio Tutorials