GithubHelp home page GithubHelp logo

robin's Introduction

๐Ÿš€ Android login, made simple

Build Status Coverage Status

Almost every app has a login and signup, so why do we re-write code everytime? Let robin handle that for you.

login signup

Usage

Add this to your build.gradle

compile 'com.sirvar:robin:0.0.1'

Create a new activity to handle login and signup requests that extends RobinActivity

public class MainActivity extends RobinActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // DO NOT call setContentView();	

        // Set title for each screen
        setLoginTitle("Sign in to Robin");
        setSignupTitle("Welcome to Robin");
        setForgotPasswordTitle("Forgot Password");		

        // Set logo for screens
        setImage(getResources().getDrawable(R.mipmap.ic_launcher));		

        // Use custom font across all views
        setFont(Typeface.createFromAsset(getAssets(), "Montserrat-Medium.ttf"));		

        // Choose theme (default is LIGHT)
        setTheme(Theme.LIGHT);
    }
}

Configuration Options

Method Description
setLoginTitle(String title) Set the title of the login screen
setSignupTitle(String title) Set the title of the signup screen
setForgotPasswordTitle(String title) Set the title of the forgot password screen
setTheme(Theme theme) Set theme from Theme enum, options above
setImage(Drawable image) Set the Drawable image of all screens
setImage(Bitmap image) Set the Bitmap image of all screens
setFont(Typeface typeface) Set custom typeface to use across all screens
startLoginFragment() Changes the visible fragment to login
startSignupFragment() Changes the visible fragment to signup
startForgotPasswordFragment() Changes the visible fragment to forgot password
showLoginFirst() Shows login fragment on Activity launch
showSignupFirst() Shows signup fragment on Activity launch
enableSocialLogin() Displays Google and Facebook login buttons
disableSocialLogin() Hides Google and Facebook login buttons

Override Methods

onLogin(String email, String password)
onSignup(String name, String email, String password)
onForgotPassword(String email)
onGoogleLogin()
onFacebookLogin()

Contributing

Want to design a new theme for robin? Follow the same format as previously done and make a PR! Also update the README adding the new theme and give yourself credit right next to it!

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.