GithubHelp home page GithubHelp logo

loginpad's Introduction

Login Pad for Android

iOS "like" login pad I created. It's pretty simple to incorporate so I thought I'd share.

Overview

This pad is similar to the iOS7 lock screen in that the pad circles and numbers swap colors as the user presses them. Once the required length is met for the login pin, the login button animates in next to the pin field. If the user chooses to delete a number, the login button animiates back out. Once the user presses the Login button, an attempt to connect is made. On successful login you'll simply launch your next activity (although there is some code in the main activity to assist you in storing the pin should you choose to do so). If the login attempt fails, the pin field is cleared and "pushes" the login button back off screen.

Screen at Launch

Screen with pin populated

Bonus Material

This app is utilizing the AndroidAutowire library to wire up the views. While not necessary, it's a great tool that will reduce your boilerplate setup for Activities, Fragments, and Views with an annotation based approach.

Usage

Nothing too fancy here. You can simply pull the resources and Java files out of this project, drop them in to yours, and add the activity to your mainifest. Everything in the Login Pad is customizable via the XML resources. To change the colors on the pad, you can either:

  • Modify the values in the colors.xml (bearing in mind all your text and the pin box background is white, so if you only want to change the rim of your circle I recommend adding a color resource to your colors.xml and doing the next option)
  • Modify the login_pad_circle_pressed & login_pad_circle_normal.xml color attributes to whatever you'd like

The animiations, crossfading text, and any other magic is happening in the LoginPadActivity.

Author / License

Copyright Cardinal Solutions 2013. Licensed under the MIT license.

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.