Giter Club home page Giter Club logo

intro-android-lab's Introduction

Intro to Android Studio Lab

Objective:

In this lab, you will learn to implement the essentials of Android Studio and working with Java & XML!

By the end of this lab, you will have a template of a signin page.

Instructions:

In this lab, we'll be creating a sign in page using TextView, EditText & Button!

  1. Create and set up a new Android Studio project:

    • Go to new -> new project -> Empty Activity.
    • Make sure your code is in Java.
  2. In your XML file:

    1. Change the layout to LinearLayout.
      • Don't forget the LinearLayout attributes.
      • Center all the objects within the layout.
    2. Add:
      • A TextView that says SignIn.
      • Two EditTexts for email & password, hint: Don't forget the difference between hint and text.
      • Two Buttons one says signin and the other signup.
        • Organize the buttons to be next to each, hint: LinearLayout & weight.
      • Don't forget to add ids
    3. Use margins to improve the appearance of the page.
  3. In your Java file:

    1. Connect the views from the XML file to the Java file.
    2. Set an onclick listener for both button: - When the signin Button is clicked:
      • Set the text of the EditTexts to be the email of the user. - When the signup Button is clicked:
      • Using Toast, display "Signup is under construction" as a message.
Call an Instructor/TA to check your completed tasks

Bonus:

  1. Perform the function of the signin button only if:
    • The email contains "@" & ".com"
    • The password is 6 characters long.
make sure you commit and push your code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.