GithubHelp home page GithubHelp logo

techscientist / unipiazza-android-twostepslogin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unipiazza/unipiazza-android-twostepslogin

0.0 1.0 0.0 7.34 MB

An Android library that helps you to make a cool two steps login in Material Design way. Such as Google web login.

License: Apache License 2.0

Java 100.00%

unipiazza-android-twostepslogin's Introduction

Material Two Steps Login

An Android library that helps you to make a cool two steps login in Material Design way. Such as Google web login.

Download

Download via Maven:

<dependency>
  <groupId>com.unipiazza.materialtwostepslogin</groupId>
  <artifactId>materialtwostepslogin</artifactId>
  <version>0.1.1</version>
  <type>pom</type>
</dependency>

or Gradle

compile 'com.unipiazza.materialtwostepslogin:materialtwostepslogin:0.1.1'

Demo

See Materialtwostepsdemo for code example. See Unipiazza in Play Store for a full working demo.

Usage

Create a new Activity with MaterialTwoStepsLogin view in xml file:

	<com.unipiazza.material2stepslogin.view.MaterialTwoStepsLogin
	android:id="@+id/login_view"
	android:layout_width="match_parent"
	android:layout_height="wrap_content" />

Customize it from Activity

	MaterialTwoStepsLogin login_view = (MaterialTwoStepsLogin) findViewById(R.id.login_view);

	login_view.setListener(this);
	login_view.setActivity(this);
	login_view.setFirst_step_background_color(getResources().getColor(R.color.colorPrimary));
	login_view.setSecond_step_background_color(Color.WHITE);
	login_view.setLogo(R.mipmap.ic_launcher);
	login_view.setDescription(R.string.insert_email_login);
	login_view.setRegister_description(R.string.not_registered_login);
	login_view.setRegister_text(R.string.registrati);

	//Register Button background
	//login_view.setRegister_background(R.drawable.rounded_white_stroke_button);
	login_view.setButton_register_text_color(Color.WHITE);

	//EditText Backgounds
	//login_view.setEdittext_password_background();
	//login_view.setEdittext_email_background();

	//Button Backgrounds
	//login_view.setButton_login_background();
	//login_view.setButton_next_background();

	//Button Text Color
	login_view.setButton_next_text_color(Color.WHITE);
	login_view.setButton_login_text_color(getResources().getColor(R.color.colorPrimary));

Implement Listener and listen for actions

	@Override
	public void onNextClicked(String email) {
	/*TODO Check if email is corrected
	    ...
	    if it is not call login_view.setNotVerified();
	*/
	login_view.setInfosAfterNext(email
		, "Material Two Steps Demo"
		, BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher));
	}

	@Override
	public void onLoginClicked(String password) {
	/*TODO Check if password is corrected
	    ...
	    if it is not call login_view.setPasswordWrong();
	    otherwise go on with your Activities
	*/
	}

	@Override
	public void onRecoverPasswordClicked() {
	//Called when user click to recover password
	}

	@Override
	public void onBackToMail() {
	//Called when user click to back button
	}

	@Override
	public void onRegisterClicked() {
	//Called when user click to register
	}

Suggestion, help and pull request al welcome!

Libraries used

circleimageview

CircularReveal

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

see LICENSE

unipiazza-android-twostepslogin's People

Contributors

monossido avatar

Watchers

Subhash Ramesh avatar

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.