Skip to content

This repository is a simple registration form app with all validation functionality developed in the android studio.

Notifications You must be signed in to change notification settings

HardikSS8/Android-Registration-Form

Repository files navigation

Android-Registration-Form

This repository is a simple registration form app with all validation functionality developed in the android studio.

-> Main purpose of this repository is to show how to use SQLite database in android studio to store the data entered in form and display on to the next page of app.

-> Here SQLite Database is created which can be found on DatabaseHelper class in the main folder of this app.

Getting Setup

  1. Download Android Studio: https://developer.android.com/studio

  2. Clone or download this repository

    -> Instructions on how to clone/download a GitHub repo: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository

  3. Open Android Studio and Import the project:

     File -> New -> Import Project
    

    -> Select the project folder - aka the project you just cloned/downloaded from GitHub

  4. Set up the Android Emulator, so you can run Android devices on your computer

     Tools -> AVD Manager -> Create virtual device
    

    -> After that click finish and start the emulator using play button in AVD Manager

Validation of Form

  1. InputFilter functionality is used for adding limit on first and last name to contain only letters and also upto some max length.

  2. For the email and date validation, these two patterns is applied:

    1. emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+";
    2. datePattern = "^(1[0-2]|0[1-9])/(3[01]" + "|[12][0-9]|0[1-9])/[0-9]{4}$";
    
  3. setError is used to show different-different errors on all fields of form as displayed in the given following section of interface.

Interface of Form

Interface(Layout) of this registration form can be found in activity_main.xml file in the layout folder of this app.


setError is shown as below.



After adding the valid details in the text field error will be gone.



Finally after clicking on register, all entered data of that user will be erased and user can see the details on the next page of app.


About

This repository is a simple registration form app with all validation functionality developed in the android studio.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages