Browse Source

login A,B and register B OK

Wayne 6 years ago
commit
52db4be9a6
64 changed files with 2053 additions and 0 deletions
  1. 53 0
      .gitignore
  2. 47 0
      build.gradle
  3. 21 0
      proguard-rules.pro
  4. 20 0
      src/main/AndroidManifest.xml
  5. 48 0
      src/main/java/com/kdanmobile/kdanloginregisterui/BaseLoginActivity.kt
  6. 5 0
      src/main/java/com/kdanmobile/kdanloginregisterui/Config.kt
  7. 64 0
      src/main/java/com/kdanmobile/kdanloginregisterui/EmailLoginFormView.kt
  8. 56 0
      src/main/java/com/kdanmobile/kdanloginregisterui/EmailRegisterFormView.kt
  9. 30 0
      src/main/java/com/kdanmobile/kdanloginregisterui/LoginAActivity.kt
  10. 50 0
      src/main/java/com/kdanmobile/kdanloginregisterui/LoginBActivity.kt
  11. 47 0
      src/main/java/com/kdanmobile/kdanloginregisterui/PwdEditText.kt
  12. 92 0
      src/main/java/com/kdanmobile/kdanloginregisterui/RegisterBActivity.kt
  13. 33 0
      src/main/java/com/kdanmobile/kdanloginregisterui/Utils.kt
  14. 15 0
      src/main/java/com/kdanmobile/kdanloginregisterui/btn/BaseEmailBtn.kt
  15. 15 0
      src/main/java/com/kdanmobile/kdanloginregisterui/btn/BaseFacebookBtn.kt
  16. 15 0
      src/main/java/com/kdanmobile/kdanloginregisterui/btn/BaseGoogleBtn.kt
  17. 15 0
      src/main/java/com/kdanmobile/kdanloginregisterui/btn/EmailLoginBtn.kt
  18. 15 0
      src/main/java/com/kdanmobile/kdanloginregisterui/btn/EmailRegisterBtn.kt
  19. 15 0
      src/main/java/com/kdanmobile/kdanloginregisterui/btn/FacebookLoginBtn.kt
  20. 15 0
      src/main/java/com/kdanmobile/kdanloginregisterui/btn/FacebookRegisterBtn.kt
  21. 15 0
      src/main/java/com/kdanmobile/kdanloginregisterui/btn/GoogleLoginBtn.kt
  22. 15 0
      src/main/java/com/kdanmobile/kdanloginregisterui/btn/GoogleRegisterBtn.kt
  23. BIN
      src/main/res/drawable-hdpi/btn_icon_fb.png
  24. BIN
      src/main/res/drawable-hdpi/btn_icon_google.png
  25. BIN
      src/main/res/drawable-hdpi/btn_icon_mail.png
  26. BIN
      src/main/res/drawable-mdpi/btn_icon_fb.png
  27. BIN
      src/main/res/drawable-mdpi/btn_icon_google.png
  28. BIN
      src/main/res/drawable-mdpi/btn_icon_mail.png
  29. BIN
      src/main/res/drawable-xhdpi/btn_icon_fb.png
  30. BIN
      src/main/res/drawable-xhdpi/btn_icon_google.png
  31. BIN
      src/main/res/drawable-xhdpi/btn_icon_mail.png
  32. BIN
      src/main/res/drawable-xxhdpi/btn_icon_fb.png
  33. BIN
      src/main/res/drawable-xxhdpi/btn_icon_google.png
  34. BIN
      src/main/res/drawable-xxhdpi/btn_icon_mail.png
  35. BIN
      src/main/res/drawable-xxxhdpi/btn_icon_fb.png
  36. BIN
      src/main/res/drawable-xxxhdpi/btn_icon_google.png
  37. BIN
      src/main/res/drawable-xxxhdpi/btn_icon_mail.png
  38. 5 0
      src/main/res/drawable/bg_email_btn.xml
  39. 6 0
      src/main/res/drawable/bg_email_login_register_form_edit_text.xml
  40. 11 0
      src/main/res/drawable/bg_email_login_register_form_edit_text_focused.xml
  41. 8 0
      src/main/res/drawable/bg_email_login_register_form_edit_text_normal.xml
  42. 5 0
      src/main/res/drawable/bg_email_login_register_form_submit_btn.xml
  43. 5 0
      src/main/res/drawable/bg_facebook_btn.xml
  44. 5 0
      src/main/res/drawable/bg_google_btn.xml
  45. 5 0
      src/main/res/drawable/ic_close_blue_24dp.xml
  46. BIN
      src/main/res/drawable/kdancloud.png
  47. 139 0
      src/main/res/layout-land/activity_login_b.xml
  48. 155 0
      src/main/res/layout-land/activity_register_b.xml
  49. 178 0
      src/main/res/layout/activity_login_a.xml
  50. 178 0
      src/main/res/layout/activity_login_b.xml
  51. 180 0
      src/main/res/layout/activity_register_b.xml
  52. 37 0
      src/main/res/layout/btn_email_login_register.xml
  53. 38 0
      src/main/res/layout/btn_facebook_login_register.xml
  54. 38 0
      src/main/res/layout/btn_google_login_register.xml
  55. 48 0
      src/main/res/layout/dialog_email_login.xml
  56. 48 0
      src/main/res/layout/dialog_email_register.xml
  57. 33 0
      src/main/res/layout/edit_text_pwd.xml
  58. 76 0
      src/main/res/layout/view_email_login_form.xml
  59. 59 0
      src/main/res/layout/view_email_register_form.xml
  60. 21 0
      src/main/res/values/colors.xml
  61. 16 0
      src/main/res/values/dimens.xml
  62. 8 0
      src/main/res/values/fonts.xml
  63. 34 0
      src/main/res/values/strings.xml
  64. 16 0
      src/main/res/values/styles.xml

+ 53 - 0
.gitignore

@@ -0,0 +1,53 @@
+# Built application files
+*.apk
+*.ap_
+
+# Files for the ART/Dalvik VM
+*.dex
+
+# Java class files
+*.class
+
+# Generated files
+bin/
+gen/
+out/
+
+# Gradle files
+.gradle/
+build/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Proguard folder generated by Eclipse
+proguard/
+
+# Log Files
+*.log
+
+# Android Studio Navigation editor temp files
+.navigation/
+
+# Android Studio captures folder
+captures/
+
+# Intellij
+*.iml
+.idea/
+
+# Keystore files
+*.jks
+
+# Windows thumbnail db
+Thumbs.db
+
+# OSX files
+.DS_Store
+
+# Eclipse project files
+.classpath
+.project
+
+keystore.properties
+*.keystore

+ 47 - 0
build.gradle

@@ -0,0 +1,47 @@
+apply plugin: 'com.android.library'
+
+// Kotlin
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+
+android {
+    compileSdkVersion 27
+
+
+
+    defaultConfig {
+        minSdkVersion 15
+        targetSdkVersion 27
+        versionCode 1
+        versionName "1.0"
+
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+
+    }
+
+    buildTypes {
+        debug {
+            manifestPlaceholders = [isDebug: true]
+        }
+        release {
+            manifestPlaceholders = [isDebug: false]
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+
+}
+
+dependencies {
+    // kotlin
+    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+
+    implementation 'com.android.support:appcompat-v7:27.0.0'
+    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
+    testImplementation 'junit:junit:4.12'
+    androidTestImplementation 'com.android.support.test:runner:1.0.2'
+    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+
+    // Apache validator
+    implementation 'commons-validator:commons-validator:1.6'
+}

+ 21 - 0
proguard-rules.pro

@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 20 - 0
src/main/AndroidManifest.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.kdanmobile.kdanloginregisterui">
+
+    <application>
+        <activity
+            android:name=".LoginBActivity"
+            android:exported="${isDebug}"
+            android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
+        <activity
+            android:name=".RegisterBActivity"
+            android:exported="${isDebug}"
+            android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
+        <activity
+            android:name=".LoginAActivity"
+            android:exported="${isDebug}"
+            android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
+    </application>
+
+</manifest>

+ 48 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/BaseLoginActivity.kt

@@ -0,0 +1,48 @@
+package com.kdanmobile.kdanloginregisterui
+
+import android.os.Bundle
+import com.kdanmobile.kdanloginregisterui.Utils.toSpannable
+
+import android.support.v7.app.AppCompatActivity
+import android.text.method.LinkMovementMethod
+import android.view.View
+import android.widget.TextView
+
+open class BaseLoginActivity : AppCompatActivity() {
+    protected var email: String = ""
+    protected var pwd: String = ""
+    protected var isRemember: Boolean = false
+
+    protected open fun onEmailLogin(email: String, pwd: String, isRemember: Boolean) { }
+    protected open fun onFbLogin(view: View?) { }
+    protected open fun onGoogleLogin(view: View?) {}
+    protected open fun onClickTurnOfService(view: View?) { }
+    protected open fun onClickPrivacyPolicy(view: View?) { }
+    protected open fun onClickSwitchToRegister(view: View?) { }
+    protected open fun onClickPwdHelp(view: View?) {}
+    protected open fun onClickCloseBtn(view: View?) { }
+
+    protected fun setupTosAndPpTextView(textView: TextView) {
+        val tos = getString(R.string.terms_of_service)
+        val pp = getString(R.string.privacy_policy)
+        val textColor = resources.getColor(R.color.tos_pp_text)
+        val tosSS = tos.toSpannable(textColor, false, View.OnClickListener { v -> onClickTurnOfService(v) })
+        val ppSS = pp.toSpannable(textColor, false, View.OnClickListener { v -> onClickPrivacyPolicy(v) })
+        textView.apply {
+            movementMethod = LinkMovementMethod.getInstance()
+            append(tosSS)
+            append(" & ")
+            append(ppSS)
+        }
+    }
+
+    protected fun setupSwitchTextView(textView: TextView) {
+        val s = textView.text
+        val textColor = resources.getColor(R.color.switch_text)
+        val ss = s.toSpannable(textColor, true, View.OnClickListener { v -> onClickSwitchToRegister(v) })
+        textView.apply {
+            movementMethod = LinkMovementMethod.getInstance()
+            text = ss
+        }
+    }
+}

+ 5 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/Config.kt

@@ -0,0 +1,5 @@
+package com.kdanmobile.kdanloginregisterui
+
+object Config {
+    const val PWD_MIN_LENGTH = 8
+}

+ 64 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/EmailLoginFormView.kt

@@ -0,0 +1,64 @@
+package com.kdanmobile.kdanloginregisterui
+
+import com.kdanmobile.kdanloginregisterui.Utils.toSpannable
+
+import android.content.Context
+import android.support.constraint.ConstraintLayout
+import android.text.Editable
+import android.text.TextUtils
+import android.util.AttributeSet
+import android.view.View
+import android.widget.TextView
+import kotlinx.android.synthetic.main.view_email_login_form.view.*
+import kotlinx.android.synthetic.main.view_email_register_form.view.*
+
+import org.apache.commons.validator.routines.EmailValidator
+
+class EmailLoginFormView @JvmOverloads constructor(
+        context: Context,
+        attrs: AttributeSet? = null,
+        defStyleAttr: Int = 0) : ConstraintLayout(context, attrs, defStyleAttr) {
+
+    var onSubmit: Runnable? = null
+    var onClickPwdHelp: View.OnClickListener? = null
+
+    var isRemember: Boolean
+        get() { return cb_emailLogin_rememberMe.isChecked }
+        set(value) { cb_emailLogin_rememberMe.isChecked = value}
+    var email: String
+        get() { return et_emailLoginForm_email.text.toString() }
+        set(value) { et_emailLoginForm_email.setText(value, TextView.BufferType.EDITABLE) }
+    var pwd: String
+        get() { return et_emailLoginForm_pwd.text.toString() }
+        set(value) { return et_emailLoginForm_pwd.setText(value, TextView.BufferType.EDITABLE) }
+
+    init {
+        inflate(getContext(), R.layout.view_email_login_form, this)
+        btn_emailLoginForm_login.setOnClickListener { onClickSubmitBtn() }
+        setupPwdHelpTv()
+    }
+
+    private fun onClickSubmitBtn() {
+        val isEmailValid = !TextUtils.isEmpty(email) && EmailValidator.getInstance().isValid(email)
+        val isPwdValid = !TextUtils.isEmpty(pwd) && pwd.length >= Config.PWD_MIN_LENGTH
+        et_emailLoginForm_email.error = when {
+            isEmailValid -> null
+            else -> context.getString(R.string.email_login_register_dialog_email_error)
+        }
+        et_emailLoginForm_pwd.error = when {
+            isPwdValid -> null
+            else -> context.getString(R.string.email_login_register_dialog_pwd_error)
+        }
+        if (isEmailValid && isPwdValid)
+            onSubmit?.run()
+    }
+
+    private fun setupPwdHelpTv() {
+        val textColor = resources.getColor(R.color.email_login_pwd_helper)
+        val s = tv_emailLogin_pwdHelp.text
+                .toSpannable(textColor, true, OnClickListener {
+                    onClickPwdHelp?.onClick(it)
+                })
+        tv_emailLogin_pwdHelp.text = s
+    }
+}

+ 56 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/EmailRegisterFormView.kt

@@ -0,0 +1,56 @@
+package com.kdanmobile.kdanloginregisterui
+
+import android.content.Context
+import android.support.constraint.ConstraintLayout
+import android.text.TextUtils
+import android.util.AttributeSet
+import android.widget.TextView
+
+import kotlinx.android.synthetic.main.view_email_register_form.view.*
+import org.apache.commons.validator.routines.EmailValidator
+
+class EmailRegisterFormView @JvmOverloads constructor(
+        context: Context,
+        attrs: AttributeSet? = null,
+        defStyleAttr: Int = 0) : ConstraintLayout(context, attrs, defStyleAttr) {
+
+    companion object {
+        const val PWD_MIN_LENGTH = 8
+    }
+
+    var onSubmit: Runnable? = null
+    var name: String
+        get() { return et_emailRegisterForm_name.text.toString() }
+        set(value) { et_emailRegisterForm_name.setText(value, TextView.BufferType.EDITABLE) }
+    var email: String
+        get() { return et_emailRegisterForm_email.text.toString() }
+        set(value) { et_emailRegisterForm_email.setText(value, TextView.BufferType.EDITABLE) }
+    var pwd: String
+        get() { return et_emailRegisterForm_pwd.text.toString() }
+        set(value) { return et_emailRegisterForm_pwd.setText(value, TextView.BufferType.EDITABLE) }
+
+    init {
+        inflate(getContext(), R.layout.view_email_register_form, this)
+        btn_emailRegisterForm_submit.setOnClickListener { onClickSubmitBtn() }
+    }
+
+    private fun onClickSubmitBtn() {
+        val isNameValid = !TextUtils.isEmpty(name)
+        val isEmailValid = !TextUtils.isEmpty(email) && EmailValidator.getInstance().isValid(email)
+        val isPwdValid = !TextUtils.isEmpty(pwd) && pwd.length >= PWD_MIN_LENGTH
+        et_emailRegisterForm_name.error = when {
+            isNameValid -> null
+            else -> context.getString(R.string.email_login_register_dialog_name_error)
+        }
+        et_emailRegisterForm_email.error = when {
+            isEmailValid -> null
+            else -> context.getString(R.string.email_login_register_dialog_email_error)
+        }
+        et_emailRegisterForm_pwd.error = when {
+            isPwdValid -> null
+            else -> context.getString(R.string.email_login_register_dialog_pwd_error)
+        }
+        if (isNameValid && isEmailValid && isPwdValid)
+            onSubmit?.run()
+    }
+}

+ 30 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/LoginAActivity.kt

@@ -0,0 +1,30 @@
+package com.kdanmobile.kdanloginregisterui
+
+import android.support.v7.app.AppCompatActivity
+import android.os.Bundle
+import android.view.View
+import kotlinx.android.synthetic.main.activity_login_a.*
+
+class LoginAActivity : BaseLoginActivity() {
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        setContentView(R.layout.activity_login_a)
+        setupTosAndPpTextView(tv_loginA_tosAndPp)
+        setupSwitchTextView(tv_loginA_switchToRegister)
+        setupFormView()
+        view_loginA_fbLogin.setOnClickListener { onFbLogin(it) }
+        view_loginA_googleLogin.setOnClickListener { onGoogleLogin(it) }
+        btn_loginA_close.setOnClickListener { onClickCloseBtn(it) }
+    }
+
+    private fun setupFormView() {
+        emailLoginFromView_loginA.let {
+            it.isRemember = isRemember
+            it.email = email
+            it.pwd = pwd
+            it.onClickPwdHelp = View.OnClickListener { onClickPwdHelp(it) }
+            it.onSubmit = Runnable { onEmailLogin(email, pwd, isRemember) }
+        }
+    }
+}

+ 50 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/LoginBActivity.kt

@@ -0,0 +1,50 @@
+package com.kdanmobile.kdanloginregisterui
+
+import com.kdanmobile.kdanloginregisterui.Utils.toSpannable
+
+import android.content.Intent
+import android.os.Bundle
+import android.support.v7.app.AlertDialog
+import android.text.method.LinkMovementMethod
+import android.view.LayoutInflater
+import android.view.View
+import kotlinx.android.synthetic.main.activity_login_b.*
+
+open class LoginBActivity : BaseLoginActivity() {
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        setContentView(R.layout.activity_login_b)
+        setupTosAndPpTextView(tv_loginB_tosAndPp)
+        setupSwitchTextView(tv_loginB_switchToRegister)
+        setupEmailLoginBtn()
+        view_loginB_fbLogin.setOnClickListener { onFbLogin(it) }
+        view_loginB_googleLogin.setOnClickListener { onGoogleLogin(it) }
+        btn_loginB_close.setOnClickListener { onClickCloseBtn(it) }
+    }
+
+    override fun onClickSwitchToRegister(view: View?) {
+        val intent = Intent(this, RegisterBActivity::class.java)
+        startActivity(intent)
+        finish()
+    }
+
+    private fun setupEmailLoginBtn() {
+        view_loginB_emailLogin.setOnClickListener {
+            val context = this
+            val view = LayoutInflater.from(context).inflate(R.layout.dialog_email_login, null)
+            val formView = view.findViewById<EmailLoginFormView>(R.id.formView_emailLoginDialog)
+            val dialog = AlertDialog.Builder(context).setView(view).show()
+            formView.let {
+                it.isRemember = isRemember
+                it.email = email
+                it.pwd = pwd
+                it.onSubmit = Runnable {
+                    onEmailLogin(it.email, it.pwd, it.isRemember)
+                    dialog.dismiss()
+                }
+                it.onClickPwdHelp = View.OnClickListener { onClickPwdHelp(it) }
+            }
+        }
+    }
+}

+ 47 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/PwdEditText.kt

@@ -0,0 +1,47 @@
+package com.kdanmobile.kdanloginregisterui
+
+import android.content.Context
+import android.support.constraint.ConstraintLayout
+import android.text.Editable
+import android.text.TextUtils
+import android.text.TextWatcher
+import android.util.AttributeSet
+import android.view.View
+import android.widget.TextView
+import kotlinx.android.synthetic.main.edit_text_pwd.view.*
+
+class PwdEditText @JvmOverloads constructor(
+        context: Context,
+        attrs: AttributeSet? = null,
+        defStyleAttr: Int = 0) : ConstraintLayout(context, attrs, defStyleAttr) {
+
+    var error: CharSequence?
+    get() = et_pwdEditText_pwd.error
+    set(value) {
+        et_pwdEditText_pwd.error = value
+    }
+
+    var text: Editable?
+    get() = et_pwdEditText_pwd.text
+    set(value) {
+        et_pwdEditText_pwd.text = value
+    }
+
+    init {
+        inflate(getContext(), R.layout.edit_text_pwd, this)
+        et_pwdEditText_pwd.addTextChangedListener(object : TextWatcher {
+            override fun afterTextChanged(s: Editable?) {}
+            override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}
+            override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
+                tv_pwdEditText_minimumHint.visibility = when {
+                    TextUtils.isEmpty(s) -> View.VISIBLE
+                    else -> GONE
+                }
+            }
+        })
+    }
+
+    fun setText(text: CharSequence, type: TextView.BufferType) {
+        et_pwdEditText_pwd.setText(text, type)
+    }
+}

+ 92 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/RegisterBActivity.kt

@@ -0,0 +1,92 @@
+package com.kdanmobile.kdanloginregisterui
+
+import com.kdanmobile.kdanloginregisterui.Utils.toSpannable
+
+import android.content.Intent
+import android.support.v7.app.AppCompatActivity
+import android.os.Bundle
+import android.support.v7.app.AlertDialog
+import android.text.method.LinkMovementMethod
+import android.view.LayoutInflater
+import android.view.View
+import kotlinx.android.synthetic.main.activity_register_b.*
+
+class RegisterBActivity : AppCompatActivity() {
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        setContentView(R.layout.activity_register_b)
+        setupSwitchTextView()
+        setupEmailRegisterBtn()
+        setupTosAndPpTextView()
+        view_registerB_fbRegister.setOnClickListener { onFbRegister(it) }
+        view_registerB_googleRegister.setOnClickListener { onGoogleRegister(it) }
+        btn_registerB_close.setOnClickListener { onClickCloseBtn(it) }
+    }
+
+    protected fun onEmailRegister(name: String, email: String, pwd: String) { }
+
+    protected fun onFbRegister(view: View?) { }
+
+    protected fun onGoogleRegister(view: View?) {}
+
+    protected fun onClickTurnOfService(view: View?) { }
+
+    protected fun onClickPrivacyPolicy(view: View?) { }
+
+    protected fun onClickSwitchToLogin(view: View?) {
+        val intent = Intent(this, LoginBActivity::class.java)
+        startActivity(intent)
+        finish()
+    }
+
+    protected fun onClickCloseBtn(view: View?) { }
+
+    private fun setupSwitchTextView() {
+        val s = tv_registerB_switchToLogin.text
+        val textColor = resources.getColor(R.color.switch_text)
+        val ss = s.toSpannable(textColor, true, View.OnClickListener { v -> onClickSwitchToLogin(v) })
+        tv_registerB_switchToLogin.apply {
+            movementMethod = LinkMovementMethod.getInstance()
+            text = ss
+        }
+    }
+
+    private fun setupTosAndPpTextView() {
+        try {
+            val key = "[d*_*b]"
+            val tos = getString(R.string.terms_of_service)
+            val pp = getString(R.string.privacy_policy)
+            val pattern = getString(R.string.register_tos_and_pp_pattern, key, key)
+            val stringArray = pattern.split(key)
+            val textColor = resources.getColor(R.color.tos_pp_text)
+            val tosSS = tos.toSpannable(textColor, false, View.OnClickListener { v -> onClickTurnOfService(v) })
+            val ppSS = pp.toSpannable(textColor, false, View.OnClickListener { v -> onClickPrivacyPolicy(v) })
+            tv_registerB_tosAndPp.apply {
+                movementMethod = LinkMovementMethod.getInstance()
+                append(stringArray[0])
+                append(tosSS)
+                append(stringArray[1])
+                append(ppSS)
+                append(stringArray[2])
+            }
+        } catch (e: Exception) {
+            // do nothing, let it go ~
+        }
+    }
+
+    private fun setupEmailRegisterBtn() {
+        view_registerB_emailRegister.setOnClickListener {
+            val context = this
+            val view = LayoutInflater.from(context).inflate(R.layout.dialog_email_register, null)
+            val formView = view.findViewById<EmailRegisterFormView>(R.id.formView_emailRegisterDialog)
+            val dialog = AlertDialog.Builder(context).setView(view).show()
+            formView.let {
+                it.onSubmit = Runnable {
+                    onEmailRegister(it.name, it.email, it.pwd)
+                    dialog.dismiss()
+                }
+            }
+        }
+    }
+}

+ 33 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/Utils.kt

@@ -0,0 +1,33 @@
+package com.kdanmobile.kdanloginregisterui
+
+import android.text.SpannableString
+import android.text.Spanned
+import android.text.TextPaint
+import android.text.style.ClickableSpan
+import android.view.View
+
+object Utils {
+
+    fun CharSequence.toSpannable(
+            textColor: Int,
+            isUnderLine: Boolean,
+            onClickListener: View.OnClickListener
+    ): SpannableString {
+        val ss = SpannableString(this)
+        val cs = object : ClickableSpan() {
+            override fun onClick(widget: View?) {
+                onClickListener.onClick(widget)
+            }
+
+            override fun updateDrawState(ds: TextPaint?) {
+                super.updateDrawState(ds)
+                ds?.apply {
+                    color = textColor
+                    isUnderlineText = isUnderLine
+                }
+            }
+        }
+        ss.setSpan(cs, 0, ss.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
+        return ss
+    }
+}

+ 15 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/btn/BaseEmailBtn.kt

@@ -0,0 +1,15 @@
+package com.kdanmobile.kdanloginregisterui.btn
+
+import android.content.Context
+import android.support.constraint.ConstraintLayout
+import android.util.AttributeSet
+import com.kdanmobile.kdanloginregisterui.R
+
+open abstract class BaseEmailBtn @JvmOverloads constructor(
+        context: Context,
+        attrs: AttributeSet? = null,
+        defStyleAttr: Int = 0) : ConstraintLayout(context, attrs, defStyleAttr) {
+    init {
+        inflate(getContext(), R.layout.btn_email_login_register, this)
+    }
+}

+ 15 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/btn/BaseFacebookBtn.kt

@@ -0,0 +1,15 @@
+package com.kdanmobile.kdanloginregisterui.btn
+
+import android.content.Context
+import android.support.constraint.ConstraintLayout
+import android.util.AttributeSet
+import com.kdanmobile.kdanloginregisterui.R
+
+open abstract class BaseFacebookBtn @JvmOverloads constructor(
+        context: Context,
+        attrs: AttributeSet? = null,
+        defStyleAttr: Int = 0) : ConstraintLayout(context, attrs, defStyleAttr) {
+    init {
+        inflate(getContext(), R.layout.btn_facebook_login_register, this)
+    }
+}

+ 15 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/btn/BaseGoogleBtn.kt

@@ -0,0 +1,15 @@
+package com.kdanmobile.kdanloginregisterui.btn
+
+import android.content.Context
+import android.support.constraint.ConstraintLayout
+import android.util.AttributeSet
+import com.kdanmobile.kdanloginregisterui.R
+
+open class BaseGoogleBtn @JvmOverloads constructor(
+        context: Context,
+        attrs: AttributeSet? = null,
+        defStyleAttr: Int = 0) : ConstraintLayout(context, attrs, defStyleAttr) {
+    init {
+        inflate(getContext(), R.layout.btn_google_login_register, this)
+    }
+}

+ 15 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/btn/EmailLoginBtn.kt

@@ -0,0 +1,15 @@
+package com.kdanmobile.kdanloginregisterui.btn
+
+import android.content.Context
+import android.util.AttributeSet
+import com.kdanmobile.kdanloginregisterui.R
+import kotlinx.android.synthetic.main.btn_email_login_register.view.*
+
+class EmailLoginBtn @JvmOverloads constructor(
+        context: Context,
+        attrs: AttributeSet? = null,
+        defStyleAttr: Int = 0) : BaseEmailBtn(context, attrs, defStyleAttr) {
+    init {
+        tv_emailLoginRegisterBtn_text.setText(R.string.signIn_email)
+    }
+}

+ 15 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/btn/EmailRegisterBtn.kt

@@ -0,0 +1,15 @@
+package com.kdanmobile.kdanloginregisterui.btn
+
+import android.content.Context
+import android.util.AttributeSet
+import com.kdanmobile.kdanloginregisterui.R
+import kotlinx.android.synthetic.main.btn_email_login_register.view.*
+
+class EmailRegisterBtn @JvmOverloads constructor(
+        context: Context,
+        attrs: AttributeSet? = null,
+        defStyleAttr: Int = 0) : BaseEmailBtn(context, attrs, defStyleAttr) {
+    init {
+        tv_emailLoginRegisterBtn_text.setText(R.string.signUp_email)
+    }
+}

+ 15 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/btn/FacebookLoginBtn.kt

@@ -0,0 +1,15 @@
+package com.kdanmobile.kdanloginregisterui.btn
+
+import android.content.Context
+import android.util.AttributeSet
+import com.kdanmobile.kdanloginregisterui.R
+import kotlinx.android.synthetic.main.btn_facebook_login_register.view.*
+
+class FacebookLoginBtn @JvmOverloads constructor(
+        context: Context,
+        attrs: AttributeSet? = null,
+        defStyleAttr: Int = 0) : BaseFacebookBtn(context, attrs, defStyleAttr) {
+    init {
+        tv_facebookLoginRegisterBtn_text.setText(R.string.signIn_facebook)
+    }
+}

+ 15 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/btn/FacebookRegisterBtn.kt

@@ -0,0 +1,15 @@
+package com.kdanmobile.kdanloginregisterui.btn
+
+import android.content.Context
+import android.util.AttributeSet
+import com.kdanmobile.kdanloginregisterui.R
+import kotlinx.android.synthetic.main.btn_facebook_login_register.view.*
+
+class FacebookRegisterBtn @JvmOverloads constructor(
+        context: Context,
+        attrs: AttributeSet? = null,
+        defStyleAttr: Int = 0) : BaseFacebookBtn(context, attrs, defStyleAttr) {
+    init {
+        tv_facebookLoginRegisterBtn_text.setText(R.string.signUp_facebook)
+    }
+}

+ 15 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/btn/GoogleLoginBtn.kt

@@ -0,0 +1,15 @@
+package com.kdanmobile.kdanloginregisterui.btn
+
+import android.content.Context
+import android.util.AttributeSet
+import com.kdanmobile.kdanloginregisterui.R
+import kotlinx.android.synthetic.main.btn_google_login_register.view.*
+
+class GoogleLoginBtn @JvmOverloads constructor(
+        context: Context,
+        attrs: AttributeSet? = null,
+        defStyleAttr: Int = 0) : BaseGoogleBtn(context, attrs, defStyleAttr) {
+    init {
+        tv_googleLoginRegisterBtn_text.setText(R.string.signIn_google)
+    }
+}

+ 15 - 0
src/main/java/com/kdanmobile/kdanloginregisterui/btn/GoogleRegisterBtn.kt

@@ -0,0 +1,15 @@
+package com.kdanmobile.kdanloginregisterui.btn
+
+import android.content.Context
+import android.util.AttributeSet
+import com.kdanmobile.kdanloginregisterui.R
+import kotlinx.android.synthetic.main.btn_google_login_register.view.*
+
+class GoogleRegisterBtn @JvmOverloads constructor(
+        context: Context,
+        attrs: AttributeSet? = null,
+        defStyleAttr: Int = 0) : BaseGoogleBtn(context, attrs, defStyleAttr) {
+    init {
+        tv_googleLoginRegisterBtn_text.setText(R.string.signUp_google)
+    }
+}

BIN
src/main/res/drawable-hdpi/btn_icon_fb.png


BIN
src/main/res/drawable-hdpi/btn_icon_google.png


BIN
src/main/res/drawable-hdpi/btn_icon_mail.png


BIN
src/main/res/drawable-mdpi/btn_icon_fb.png


BIN
src/main/res/drawable-mdpi/btn_icon_google.png


BIN
src/main/res/drawable-mdpi/btn_icon_mail.png


BIN
src/main/res/drawable-xhdpi/btn_icon_fb.png


BIN
src/main/res/drawable-xhdpi/btn_icon_google.png


BIN
src/main/res/drawable-xhdpi/btn_icon_mail.png


BIN
src/main/res/drawable-xxhdpi/btn_icon_fb.png


BIN
src/main/res/drawable-xxhdpi/btn_icon_google.png


BIN
src/main/res/drawable-xxhdpi/btn_icon_mail.png


BIN
src/main/res/drawable-xxxhdpi/btn_icon_fb.png


BIN
src/main/res/drawable-xxxhdpi/btn_icon_google.png


BIN
src/main/res/drawable-xxxhdpi/btn_icon_mail.png


+ 5 - 0
src/main/res/drawable/bg_email_btn.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <stroke android:width="1dp" android:color="@color/kdan_blue" />
+    <corners android:radius="2dp"/>
+</shape>

+ 6 - 0
src/main/res/drawable/bg_email_login_register_form_edit_text.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/bg_email_login_register_form_edit_text_focused" android:state_pressed="true"/>
+    <item android:drawable="@drawable/bg_email_login_register_form_edit_text_focused" android:state_enabled="true" android:state_focused="true"/>
+    <item android:drawable="@drawable/bg_email_login_register_form_edit_text_normal"/>
+</selector>

+ 11 - 0
src/main/res/drawable/bg_email_login_register_form_edit_text_focused.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle" >
+
+    <stroke
+        android:width="1dp"
+        android:color="@color/email_login_register_form_primary_blue" />
+
+    <solid android:color="#fff"/>
+    
+</shape>

+ 8 - 0
src/main/res/drawable/bg_email_login_register_form_edit_text_normal.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle" >
+    <stroke
+        android:width="1dp"
+        android:color="@color/email_login_register_form_input_border" />
+    <solid android:color="#fff"/>
+</shape>

+ 5 - 0
src/main/res/drawable/bg_email_login_register_form_submit_btn.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@color/email_login_register_form_primary_blue" />
+    <corners android:radius="2dp"/>
+</shape>

+ 5 - 0
src/main/res/drawable/bg_facebook_btn.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@color/facebook_blue"/>
+    <corners android:radius="2dp"/>
+</shape>

+ 5 - 0
src/main/res/drawable/bg_google_btn.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@color/google_blue"/>
+    <corners android:radius="2dp"/>
+</shape>

+ 5 - 0
src/main/res/drawable/ic_close_blue_24dp.xml

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:tint="#007AFF"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
+</vector>

BIN
src/main/res/drawable/kdancloud.png


+ 139 - 0
src/main/res/layout-land/activity_login_b.xml

@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".LoginBActivity">
+
+    <ScrollView
+        android:fillViewport="true"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        >
+
+        <android.support.constraint.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <android.support.constraint.Guideline
+                android:id="@+id/guideLine_loginB_centerHorizontal"
+                android:orientation="vertical"
+                android:layout_width="0dp"
+                android:layout_height="0dp"
+                app:layout_constraintGuide_percent="0.5"
+                />
+
+            <android.widget.Space
+                android:id="@+id/anchor_loginB_left"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="65dp"
+                android:layout_marginStart="65dp"
+                app:layout_constraintLeft_toLeftOf="@id/guideLine_loginB_centerHorizontal"
+                />
+
+            <android.widget.Space
+                android:id="@+id/anchor_loginB_right"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="271dp"
+                android:layout_marginStart="271dp"
+                app:layout_constraintLeft_toLeftOf="@id/guideLine_loginB_centerHorizontal"
+                />
+
+            <ImageButton
+                android:id="@+id/btn_loginB_close"
+                android:background="?android:attr/selectableItemBackground"
+                android:src="@drawable/ic_close_blue_24dp"
+                android:contentDescription="@string/emptyImageContextDescription"
+                android:layout_width="36dp"
+                android:layout_height="36dp"
+                android:layout_marginTop="16dp"
+                android:layout_marginLeft="15dp"
+                android:layout_marginStart="15dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                />
+
+            <ImageView
+                android:id="@+id/iv_loginB_kdanCloud"
+                android:src="@drawable/kdancloud"
+                android:scaleType="centerCrop"
+                android:contentDescription="@string/emptyImageContextDescription"
+                android:layout_width="117dp"
+                android:layout_height="78dp"
+                android:layout_marginRight="120dp"
+                android:layout_marginEnd="120dp"
+                app:layout_constraintRight_toRightOf="@id/guideLine_loginB_centerHorizontal"
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintBottom_toTopOf="@+id/tv_loginB_switchToRegister"
+                app:layout_constraintVertical_chainStyle="packed"
+                />
+
+            <TextView
+                android:id="@+id/tv_loginB_switchToRegister"
+                android:text="@string/switch_to_register"
+                android:textColor="@color/switch_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="36dp"
+                app:layout_constraintTop_toBottomOf="@id/iv_loginB_kdanCloud"
+                app:layout_constraintLeft_toLeftOf="@id/iv_loginB_kdanCloud"
+                app:layout_constraintRight_toRightOf="@id/iv_loginB_kdanCloud"
+                app:layout_constraintBottom_toBottomOf="parent"
+                />
+
+            <com.kdanmobile.kdanloginregisterui.btn.FacebookLoginBtn
+                android:id="@+id/view_loginB_fbLogin"
+                android:layout_width="0dp"
+                android:layout_height="37dp"
+                app:layout_constraintBottom_toTopOf="@+id/view_loginB_googleLogin"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginB_right"
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintVertical_chainStyle="packed" />
+
+            <com.kdanmobile.kdanloginregisterui.btn.GoogleLoginBtn
+                android:id="@+id/view_loginB_googleLogin"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/login_register_btn_height"
+                android:layout_marginTop="10dp"
+                app:layout_constraintTop_toBottomOf="@id/view_loginB_fbLogin"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginB_right"
+                app:layout_constraintBottom_toTopOf="@+id/view_loginB_emailLogin"
+                />
+
+            <com.kdanmobile.kdanloginregisterui.btn.EmailLoginBtn
+                android:id="@+id/view_loginB_emailLogin"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/login_register_btn_height"
+                android:layout_marginTop="10dp"
+                app:layout_constraintTop_toBottomOf="@id/view_loginB_googleLogin"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginB_right"
+                app:layout_constraintBottom_toTopOf="@+id/tv_loginB_tosAndPp"
+                />
+
+            <TextView
+                android:id="@+id/tv_loginB_tosAndPp"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="16dp"
+                android:textSize="@dimen/tos_and_pp_text_size"
+                android:gravity="center"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginB_right"
+                app:layout_constraintTop_toBottomOf="@id/view_loginB_emailLogin"
+                tools:text="Our terms of service and privacy policy."
+                />
+        </android.support.constraint.ConstraintLayout>
+    </ScrollView>
+
+</android.support.constraint.ConstraintLayout>

+ 155 - 0
src/main/res/layout-land/activity_register_b.xml

@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".RegisterBActivity">
+
+    <ScrollView
+        android:fillViewport="true"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        >
+
+        <android.support.constraint.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <android.support.constraint.Guideline
+                android:id="@+id/guideLine_registerB_centerHorizontal"
+                android:orientation="vertical"
+                android:layout_width="0dp"
+                android:layout_height="0dp"
+                app:layout_constraintGuide_percent="0.5"
+                />
+
+            <android.widget.Space
+                android:id="@+id/anchor_registerB_left"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="65dp"
+                android:layout_marginStart="65dp"
+                app:layout_constraintLeft_toLeftOf="@id/guideLine_registerB_centerHorizontal"
+                />
+
+            <android.widget.Space
+                android:id="@+id/anchor_registerB_right"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="271dp"
+                android:layout_marginStart="271dp"
+                app:layout_constraintLeft_toLeftOf="@id/guideLine_registerB_centerHorizontal"
+                />
+
+            <ImageButton
+                android:id="@+id/btn_registerB_close"
+                android:background="?android:attr/selectableItemBackground"
+                android:src="@drawable/ic_close_blue_24dp"
+                android:contentDescription="@string/emptyImageContextDescription"
+                android:layout_width="36dp"
+                android:layout_height="36dp"
+                android:layout_marginTop="16dp"
+                android:layout_marginLeft="15dp"
+                android:layout_marginStart="15dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                />
+
+            <ImageView
+                android:id="@+id/iv_registerB_kdanCloud"
+                android:src="@drawable/kdancloud"
+                android:scaleType="centerCrop"
+                android:contentDescription="@string/emptyImageContextDescription"
+                android:layout_width="117dp"
+                android:layout_height="78dp"
+                android:layout_marginRight="120dp"
+                android:layout_marginEnd="120dp"
+                app:layout_constraintRight_toRightOf="@id/guideLine_registerB_centerHorizontal"
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintBottom_toTopOf="@+id/tv_registerB_title"
+                app:layout_constraintVertical_chainStyle="packed"
+                />
+
+            <TextView
+                android:id="@+id/tv_registerB_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="10dp"
+                android:gravity="center"
+                android:text="@string/register_title"
+                android:textColor="@color/register_title"
+                android:textSize="16sp"
+                android:textStyle="bold"
+                app:layout_constraintLeft_toLeftOf="@id/iv_registerB_kdanCloud"
+                app:layout_constraintRight_toRightOf="@id/iv_registerB_kdanCloud"
+                app:layout_constraintTop_toBottomOf="@id/iv_registerB_kdanCloud"
+                app:layout_constraintBottom_toTopOf="@+id/tv_registerB_switchToLogin"
+                app:layout_constraintVertical_chainStyle="packed" />
+
+            <TextView
+                android:id="@+id/tv_registerB_switchToLogin"
+                android:text="@string/switch_to_login"
+                android:textColor="@color/switch_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="10dp"
+                app:layout_constraintTop_toBottomOf="@id/tv_registerB_title"
+                app:layout_constraintLeft_toLeftOf="@id/iv_registerB_kdanCloud"
+                app:layout_constraintRight_toRightOf="@id/iv_registerB_kdanCloud"
+                app:layout_constraintBottom_toBottomOf="parent"
+                />
+
+            <com.kdanmobile.kdanloginregisterui.btn.FacebookRegisterBtn
+                android:id="@+id/view_registerB_fbRegister"
+                android:layout_width="0dp"
+                android:layout_height="37dp"
+                app:layout_constraintBottom_toTopOf="@+id/view_registerB_googleRegister"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_registerB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_registerB_right"
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintVertical_chainStyle="packed" />
+
+            <com.kdanmobile.kdanloginregisterui.btn.GoogleRegisterBtn
+                android:id="@+id/view_registerB_googleRegister"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/login_register_btn_height"
+                android:layout_marginTop="10dp"
+                app:layout_constraintTop_toBottomOf="@id/view_registerB_fbRegister"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_registerB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_registerB_right"
+                app:layout_constraintBottom_toTopOf="@+id/view_registerB_emailRegister"
+                />
+
+            <com.kdanmobile.kdanloginregisterui.btn.EmailRegisterBtn
+                android:id="@+id/view_registerB_emailRegister"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/login_register_btn_height"
+                android:layout_marginTop="10dp"
+                app:layout_constraintTop_toBottomOf="@id/view_registerB_googleRegister"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_registerB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_registerB_right"
+                app:layout_constraintBottom_toTopOf="@+id/tv_registerB_tosAndPp"
+                />
+
+            <TextView
+                android:id="@+id/tv_registerB_tosAndPp"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="16dp"
+                android:textSize="@dimen/tos_and_pp_text_size"
+                android:gravity="center"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_registerB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_registerB_right"
+                app:layout_constraintTop_toBottomOf="@id/view_registerB_emailRegister"
+                tools:text="By signing up, you agree to our terms of service and that you have read our privacy policy."
+                />
+        </android.support.constraint.ConstraintLayout>
+    </ScrollView>
+
+</android.support.constraint.ConstraintLayout>

+ 178 - 0
src/main/res/layout/activity_login_a.xml

@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".LoginAActivity">
+
+    <ScrollView
+        android:fillViewport="true"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        >
+
+        <android.support.constraint.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <android.support.constraint.Guideline
+                android:id="@+id/guideLine_loginA_centerHorizontal"
+                android:orientation="vertical"
+                android:layout_width="0dp"
+                android:layout_height="0dp"
+                app:layout_constraintGuide_percent="0.5"
+                />
+
+            <android.widget.Space
+                android:id="@+id/anchor_loginA_left"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="136dp"
+                android:layout_marginEnd="136dp"
+                app:layout_constraintRight_toRightOf="@id/guideLine_loginA_centerHorizontal"
+                />
+
+            <android.widget.Space
+                android:id="@+id/anchor_loginA_right"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="136dp"
+                android:layout_marginStart="136dp"
+                app:layout_constraintLeft_toLeftOf="@id/guideLine_loginA_centerHorizontal"
+                />
+
+            <ImageButton
+                android:id="@+id/btn_loginA_close"
+                android:background="?android:attr/selectableItemBackground"
+                android:src="@drawable/ic_close_blue_24dp"
+                android:contentDescription="@string/emptyImageContextDescription"
+                android:layout_width="36dp"
+                android:layout_height="36dp"
+                android:layout_marginTop="16dp"
+                android:layout_marginLeft="15dp"
+                android:layout_marginStart="15dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                />
+
+            <ImageView
+                android:id="@+id/iv_loginA_kdanCloud"
+                android:src="@drawable/kdancloud"
+                android:scaleType="centerCrop"
+                android:contentDescription="@string/emptyImageContextDescription"
+                android:layout_width="116dp"
+                android:layout_height="77dp"
+                android:layout_marginTop="48dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintRight_toRightOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintBottom_toTopOf="@+id/emailLoginFromView_loginA"
+                app:layout_constraintVertical_chainStyle="packed"
+                />
+
+            <com.kdanmobile.kdanloginregisterui.EmailLoginFormView
+                android:id="@+id/emailLoginFromView_loginA"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="36dp"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginA_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginA_right"
+                app:layout_constraintTop_toBottomOf="@id/iv_loginA_kdanCloud"
+                app:layout_constraintBottom_toTopOf="@+id/tv_loginA_orDivider"
+                />
+
+            <TextView
+                android:id="@+id/tv_loginA_orDivider"
+                android:text="@string/or"
+                android:textSize="@dimen/or_divider_text_size"
+                android:textColor="@color/or_diver"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="24dp"
+                app:layout_constraintTop_toBottomOf="@id/emailLoginFromView_loginA"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintRight_toRightOf="parent"
+                app:layout_constraintBottom_toTopOf="@+id/view_loginA_fbLogin"
+                />
+
+            <View
+                android:background="@color/or_diver"
+                android:layout_width="0dp"
+                android:layout_height="1dp"
+                android:layout_marginRight="16dp"
+                android:layout_marginEnd="16dp"
+                app:layout_constraintTop_toTopOf="@id/tv_loginA_orDivider"
+                app:layout_constraintBottom_toBottomOf="@id/tv_loginA_orDivider"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginA_left"
+                app:layout_constraintRight_toLeftOf="@id/tv_loginA_orDivider"
+                />
+
+            <View
+                android:background="@color/or_diver"
+                android:layout_width="0dp"
+                android:layout_height="1dp"
+                android:layout_marginLeft="16dp"
+                android:layout_marginStart="16dp"
+                app:layout_constraintTop_toTopOf="@id/tv_loginA_orDivider"
+                app:layout_constraintBottom_toBottomOf="@id/tv_loginA_orDivider"
+                app:layout_constraintLeft_toRightOf="@id/tv_loginA_orDivider"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginA_right"
+                />
+
+            <com.kdanmobile.kdanloginregisterui.btn.FacebookLoginBtn
+                android:id="@+id/view_loginA_fbLogin"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/login_register_btn_height"
+                android:layout_marginTop="24dp"
+                app:layout_constraintTop_toBottomOf="@id/tv_loginA_orDivider"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginA_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginA_right"
+                app:layout_constraintBottom_toTopOf="@+id/view_loginA_googleLogin"
+                />
+
+            <com.kdanmobile.kdanloginregisterui.btn.GoogleLoginBtn
+                android:id="@+id/view_loginA_googleLogin"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/login_register_btn_height"
+                android:layout_marginTop="12dp"
+                app:layout_constraintTop_toBottomOf="@id/view_loginA_fbLogin"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginA_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginA_right"
+                app:layout_constraintBottom_toTopOf="@+id/tv_loginA_switchToRegister"
+                />
+
+            <TextView
+                android:id="@+id/tv_loginA_switchToRegister"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="32dp"
+                android:text="@string/switch_to_register"
+                android:textColor="@color/switch_text"
+                android:gravity="center"
+                app:layout_constraintBottom_toTopOf="@+id/tv_loginA_tosAndPp"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginA_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginA_right"
+                app:layout_constraintTop_toBottomOf="@id/view_loginA_googleLogin" />
+
+            <TextView
+                android:id="@+id/tv_loginA_tosAndPp"
+                tools:text="Our terms of service and privacy policy."
+                android:textSize="@dimen/tos_and_pp_text_size"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="32dp"
+                android:layout_marginBottom="20dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintRight_toRightOf="parent"
+                app:layout_constraintTop_toBottomOf="@id/tv_loginA_switchToRegister"
+                app:layout_constraintBottom_toBottomOf="parent"
+                />
+        </android.support.constraint.ConstraintLayout>
+    </ScrollView>
+
+</android.support.constraint.ConstraintLayout>

+ 178 - 0
src/main/res/layout/activity_login_b.xml

@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".LoginBActivity">
+
+    <ScrollView
+        android:fillViewport="true"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        >
+
+        <android.support.constraint.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <android.support.constraint.Guideline
+                android:id="@+id/guideLine_loginB_centerHorizontal"
+                android:orientation="vertical"
+                android:layout_width="0dp"
+                android:layout_height="0dp"
+                app:layout_constraintGuide_percent="0.5"
+                />
+
+            <android.widget.Space
+                android:id="@+id/anchor_loginB_left"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="136dp"
+                android:layout_marginEnd="136dp"
+                app:layout_constraintRight_toRightOf="@id/guideLine_loginB_centerHorizontal"
+                />
+
+            <android.widget.Space
+                android:id="@+id/anchor_loginB_right"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="136dp"
+                android:layout_marginStart="136dp"
+                app:layout_constraintLeft_toLeftOf="@id/guideLine_loginB_centerHorizontal"
+                />
+
+            <ImageButton
+                android:id="@+id/btn_loginB_close"
+                android:background="?android:attr/selectableItemBackground"
+                android:src="@drawable/ic_close_blue_24dp"
+                android:contentDescription="@string/emptyImageContextDescription"
+                android:layout_width="36dp"
+                android:layout_height="36dp"
+                android:layout_marginTop="16dp"
+                android:layout_marginLeft="15dp"
+                android:layout_marginStart="15dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                />
+
+            <ImageView
+                android:id="@+id/iv_loginB_kdanCloud"
+                android:src="@drawable/kdancloud"
+                android:scaleType="centerCrop"
+                android:contentDescription="@string/emptyImageContextDescription"
+                android:layout_width="116dp"
+                android:layout_height="77dp"
+                android:layout_marginTop="70dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintRight_toRightOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintBottom_toTopOf="@+id/view_loginB_fbLogin"
+                app:layout_constraintVertical_chainStyle="packed"
+                />
+
+            <com.kdanmobile.kdanloginregisterui.btn.FacebookLoginBtn
+                android:id="@+id/view_loginB_fbLogin"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/login_register_btn_height"
+                android:layout_marginTop="40dp"
+                app:layout_constraintTop_toBottomOf="@id/iv_loginB_kdanCloud"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginB_right"
+                app:layout_constraintBottom_toTopOf="@+id/view_loginB_googleLogin"
+                />
+
+            <com.kdanmobile.kdanloginregisterui.btn.GoogleLoginBtn
+                android:id="@+id/view_loginB_googleLogin"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/login_register_btn_height"
+                android:layout_marginTop="10dp"
+                app:layout_constraintTop_toBottomOf="@id/view_loginB_fbLogin"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginB_right"
+                app:layout_constraintBottom_toTopOf="@+id/tv_loginB_orDivider"
+                />
+
+            <TextView
+                android:id="@+id/tv_loginB_orDivider"
+                android:text="@string/or"
+                android:textSize="@dimen/or_divider_text_size"
+                android:textColor="@color/or_diver"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="30dp"
+                app:layout_constraintTop_toBottomOf="@id/view_loginB_googleLogin"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintRight_toRightOf="parent"
+                app:layout_constraintBottom_toTopOf="@+id/view_loginB_emailLogin"
+                />
+
+            <View
+                android:background="@color/or_diver"
+                android:layout_width="0dp"
+                android:layout_height="1dp"
+                android:layout_marginRight="16dp"
+                android:layout_marginEnd="16dp"
+                app:layout_constraintTop_toTopOf="@id/tv_loginB_orDivider"
+                app:layout_constraintBottom_toBottomOf="@id/tv_loginB_orDivider"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginB_left"
+                app:layout_constraintRight_toLeftOf="@id/tv_loginB_orDivider"
+                />
+
+            <View
+                android:background="@color/or_diver"
+                android:layout_width="0dp"
+                android:layout_height="1dp"
+                android:layout_marginLeft="16dp"
+                android:layout_marginStart="16dp"
+                app:layout_constraintTop_toTopOf="@id/tv_loginB_orDivider"
+                app:layout_constraintBottom_toBottomOf="@id/tv_loginB_orDivider"
+                app:layout_constraintLeft_toRightOf="@id/tv_loginB_orDivider"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginB_right"
+                />
+
+            <com.kdanmobile.kdanloginregisterui.btn.EmailLoginBtn
+                android:id="@+id/view_loginB_emailLogin"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/login_register_btn_height"
+                android:layout_marginTop="30dp"
+                app:layout_constraintTop_toBottomOf="@id/tv_loginB_orDivider"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginB_right"
+                app:layout_constraintBottom_toTopOf="@+id/tv_loginB_switchToRegister"
+                />
+
+            <TextView
+                android:id="@+id/tv_loginB_switchToRegister"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="20dp"
+                android:text="@string/switch_to_register"
+                android:textColor="@color/switch_text"
+                android:gravity="center"
+                app:layout_constraintBottom_toTopOf="@+id/tv_loginB_tosAndPp"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_loginB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_loginB_right"
+                app:layout_constraintTop_toBottomOf="@id/view_loginB_emailLogin" />
+
+            <TextView
+                android:id="@+id/tv_loginB_tosAndPp"
+                tools:text="Our terms of service and privacy policy."
+                android:textSize="@dimen/tos_and_pp_text_size"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="134dp"
+                android:layout_marginBottom="20dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintRight_toRightOf="parent"
+                app:layout_constraintTop_toBottomOf="@id/tv_loginB_switchToRegister"
+                app:layout_constraintBottom_toBottomOf="parent"
+                />
+        </android.support.constraint.ConstraintLayout>
+    </ScrollView>
+
+</android.support.constraint.ConstraintLayout>

+ 180 - 0
src/main/res/layout/activity_register_b.xml

@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".RegisterBActivity">
+
+    <ScrollView
+        android:fillViewport="true"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        >
+
+        <android.support.constraint.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <android.support.constraint.Guideline
+                android:id="@+id/guideLine_registerB_centerHorizontal"
+                android:orientation="vertical"
+                android:layout_width="0dp"
+                android:layout_height="0dp"
+                app:layout_constraintGuide_percent="0.5"
+                />
+
+            <android.widget.Space
+                android:id="@+id/anchor_registerB_left"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="136dp"
+                android:layout_marginEnd="136dp"
+                app:layout_constraintRight_toRightOf="@id/guideLine_registerB_centerHorizontal"
+                />
+
+            <android.widget.Space
+                android:id="@+id/anchor_registerB_right"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="136dp"
+                android:layout_marginStart="136dp"
+                app:layout_constraintLeft_toLeftOf="@id/guideLine_registerB_centerHorizontal"
+                />
+
+            <ImageButton
+                android:id="@+id/btn_registerB_close"
+                android:background="?android:attr/selectableItemBackground"
+                android:src="@drawable/ic_close_blue_24dp"
+                android:contentDescription="@string/emptyImageContextDescription"
+                android:layout_width="36dp"
+                android:layout_height="36dp"
+                android:layout_marginTop="16dp"
+                android:layout_marginLeft="15dp"
+                android:layout_marginStart="15dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                />
+
+            <TextView
+                android:id="@+id/tv_registerB_title"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="96dp"
+                android:gravity="center"
+                android:text="@string/register_title"
+                android:textColor="@color/register_title"
+                android:textSize="24sp"
+                android:textStyle="bold"
+                app:layout_constraintBottom_toTopOf="@+id/view_registerB_fbRegister"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_registerB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_registerB_right"
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintVertical_chainStyle="packed" />
+
+            <com.kdanmobile.kdanloginregisterui.btn.FacebookRegisterBtn
+                android:id="@+id/view_registerB_fbRegister"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/login_register_btn_height"
+                android:layout_marginTop="66dp"
+                app:layout_constraintTop_toBottomOf="@id/tv_registerB_title"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_registerB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_registerB_right"
+                app:layout_constraintBottom_toTopOf="@+id/view_registerB_googleRegister"
+                />
+
+            <com.kdanmobile.kdanloginregisterui.btn.GoogleRegisterBtn
+                android:id="@+id/view_registerB_googleRegister"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/login_register_btn_height"
+                android:layout_marginTop="10dp"
+                app:layout_constraintTop_toBottomOf="@id/view_registerB_fbRegister"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_registerB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_registerB_right"
+                app:layout_constraintBottom_toTopOf="@+id/tv_registerB_orDivider"
+                />
+
+            <TextView
+                android:id="@+id/tv_registerB_orDivider"
+                android:text="@string/or"
+                android:textSize="@dimen/or_divider_text_size"
+                android:textColor="@color/or_diver"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="30dp"
+                app:layout_constraintTop_toBottomOf="@id/view_registerB_googleRegister"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintRight_toRightOf="parent"
+                app:layout_constraintBottom_toTopOf="@+id/view_registerB_emailRegister"
+                />
+
+            <View
+                android:background="@color/or_diver"
+                android:layout_width="0dp"
+                android:layout_height="1dp"
+                android:layout_marginRight="16dp"
+                android:layout_marginEnd="16dp"
+                app:layout_constraintTop_toTopOf="@id/tv_registerB_orDivider"
+                app:layout_constraintBottom_toBottomOf="@id/tv_registerB_orDivider"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_registerB_left"
+                app:layout_constraintRight_toLeftOf="@id/tv_registerB_orDivider"
+                />
+
+            <View
+                android:background="@color/or_diver"
+                android:layout_width="0dp"
+                android:layout_height="1dp"
+                android:layout_marginLeft="16dp"
+                android:layout_marginStart="16dp"
+                app:layout_constraintTop_toTopOf="@id/tv_registerB_orDivider"
+                app:layout_constraintBottom_toBottomOf="@id/tv_registerB_orDivider"
+                app:layout_constraintLeft_toRightOf="@id/tv_registerB_orDivider"
+                app:layout_constraintRight_toRightOf="@id/anchor_registerB_right"
+                />
+
+            <com.kdanmobile.kdanloginregisterui.btn.EmailRegisterBtn
+                android:id="@+id/view_registerB_emailRegister"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/login_register_btn_height"
+                android:layout_marginTop="30dp"
+                app:layout_constraintTop_toBottomOf="@id/tv_registerB_orDivider"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_registerB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_registerB_right"
+                app:layout_constraintBottom_toTopOf="@+id/tv_registerB_switchToLogin"
+                />
+
+            <TextView
+                android:id="@+id/tv_registerB_switchToLogin"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="20dp"
+                android:text="@string/switch_to_login"
+                android:textColor="@color/switch_text"
+                android:gravity="center"
+                app:layout_constraintBottom_toTopOf="@+id/tv_registerB_tosAndPp"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_registerB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_registerB_right"
+                app:layout_constraintTop_toBottomOf="@id/view_registerB_emailRegister" />
+
+            <TextView
+                android:id="@+id/tv_registerB_tosAndPp"
+                tools:text="By signing up, you agree to our terms of service and that you have read our privacy policy."
+                android:textSize="@dimen/tos_and_pp_text_size"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="134dp"
+                android:layout_marginBottom="20dp"
+                android:gravity="center"
+                app:layout_constraintLeft_toLeftOf="@id/anchor_registerB_left"
+                app:layout_constraintRight_toRightOf="@id/anchor_registerB_right"
+                app:layout_constraintTop_toBottomOf="@id/tv_registerB_switchToLogin"
+                app:layout_constraintBottom_toBottomOf="parent"
+                />
+        </android.support.constraint.ConstraintLayout>
+    </ScrollView>
+
+</android.support.constraint.ConstraintLayout>

+ 37 - 0
src/main/res/layout/btn_email_login_register.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="@dimen/login_register_btn_height"
+    android:background="@drawable/bg_email_btn"
+    >
+
+    <ImageView
+        android:id="@+id/iv_emailLoginRegisterBtn_ic"
+        android:src="@drawable/btn_icon_mail"
+        android:scaleType="centerCrop"
+        android:contentDescription="@string/emptyImageContextDescription"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:layout_margin="1dp"
+        app:layout_constraintDimensionRatio="1:1"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        />
+
+    <TextView
+        android:id="@+id/tv_emailLoginRegisterBtn_text"
+        android:text="@string/signIn_email"
+        android:textColor="@color/kdan_blue"
+        android:textSize="@dimen/login_register_text_size"
+        android:fontFamily="@string/font_roboto_medium"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:layout_constraintLeft_toRightOf="@id/iv_emailLoginRegisterBtn_ic"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        />
+</android.support.constraint.ConstraintLayout>

+ 38 - 0
src/main/res/layout/btn_facebook_login_register.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="@dimen/login_register_btn_height"
+    android:background="@drawable/bg_facebook_btn"
+    >
+
+    <ImageView
+        android:id="@+id/iv_facebookLoginRegisterBtn_ic"
+        android:src="@drawable/btn_icon_fb"
+        android:scaleType="centerCrop"
+        android:contentDescription="@string/emptyImageContextDescription"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:layout_margin="1dp"
+        app:layout_constraintDimensionRatio="1:1"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        />
+
+    <TextView
+        android:id="@+id/tv_facebookLoginRegisterBtn_text"
+        android:text="@string/signIn_facebook"
+        android:textColor="@color/third_party_btn_text"
+        android:textSize="@dimen/login_register_text_size"
+        android:fontFamily="@string/font_roboto_medium"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:layout_constraintLeft_toRightOf="@id/iv_facebookLoginRegisterBtn_ic"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        />
+
+</android.support.constraint.ConstraintLayout>

+ 38 - 0
src/main/res/layout/btn_google_login_register.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="@dimen/login_register_btn_height"
+    android:background="@drawable/bg_google_btn"
+    >
+
+    <ImageView
+        android:id="@+id/iv_googleLoginRegisterBtn_ic"
+        android:src="@drawable/btn_icon_google"
+        android:scaleType="centerCrop"
+        android:contentDescription="@string/emptyImageContextDescription"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:layout_margin="1dp"
+        app:layout_constraintDimensionRatio="1:1"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        />
+
+    <TextView
+        android:id="@+id/tv_googleLoginRegisterBtn_text"
+        android:text="@string/signIn_google"
+        android:textColor="@color/third_party_btn_text"
+        android:textSize="@dimen/login_register_text_size"
+        android:fontFamily="@string/font_roboto_medium"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:layout_constraintLeft_toRightOf="@id/iv_googleLoginRegisterBtn_ic"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        />
+
+</android.support.constraint.ConstraintLayout>

+ 48 - 0
src/main/res/layout/dialog_email_login.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/email_login_register_form_bg"
+    >
+
+    <android.support.constraint.Guideline
+        android:id="@+id/guideLine_emailLoginForm_centerVertical"
+        android:orientation="vertical"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:layout_constraintGuide_percent="0.5"
+        />
+
+    <Space
+        android:id="@+id/anchor_emailLoginForm_left"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="136dp"
+        android:layout_marginEnd="136dp"
+        app:layout_constraintRight_toRightOf="@id/guideLine_emailLoginForm_centerVertical"
+        />
+
+    <Space
+        android:id="@+id/anchor_emailLoginForm_right"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="136dp"
+        android:layout_marginStart="136dp"
+        app:layout_constraintLeft_toLeftOf="@id/guideLine_emailLoginForm_centerVertical"
+        />
+
+    <com.kdanmobile.kdanloginregisterui.EmailLoginFormView
+        android:id="@+id/formView_emailLoginDialog"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        app:layout_constraintLeft_toLeftOf="@id/anchor_emailLoginForm_left"
+        app:layout_constraintRight_toRightOf="@id/anchor_emailLoginForm_right"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        android:layout_marginTop="54dp"
+        android:layout_marginBottom="54dp"
+        />
+
+</android.support.constraint.ConstraintLayout>

+ 48 - 0
src/main/res/layout/dialog_email_register.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/email_login_register_form_bg"
+    >
+
+    <android.support.constraint.Guideline
+        android:id="@+id/guideLine_emailRegisterForm_centerVertical"
+        android:orientation="vertical"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:layout_constraintGuide_percent="0.5"
+        />
+
+    <Space
+        android:id="@+id/anchor_emailRegisterForm_left"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="136dp"
+        android:layout_marginEnd="136dp"
+        app:layout_constraintRight_toRightOf="@id/guideLine_emailRegisterForm_centerVertical"
+        />
+
+    <Space
+        android:id="@+id/anchor_emailRegisterForm_right"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="136dp"
+        android:layout_marginStart="136dp"
+        app:layout_constraintLeft_toLeftOf="@id/guideLine_emailRegisterForm_centerVertical"
+        />
+
+    <com.kdanmobile.kdanloginregisterui.EmailRegisterFormView
+        android:id="@+id/formView_emailRegisterDialog"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        app:layout_constraintLeft_toLeftOf="@id/anchor_emailRegisterForm_left"
+        app:layout_constraintRight_toRightOf="@id/anchor_emailRegisterForm_right"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        android:layout_marginTop="54dp"
+        android:layout_marginBottom="54dp"
+        />
+
+</android.support.constraint.ConstraintLayout>

+ 33 - 0
src/main/res/layout/edit_text_pwd.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="@dimen/email_login_dialog_field_height"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+
+    <EditText
+        android:id="@+id/et_pwdEditText_pwd"
+        style="@style/EmailLoginRegisterFormEditText"
+        android:inputType="textPassword"
+        android:hint="@string/email_login_register_dialog_password_edit_text_hint"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        />
+
+    <TextView
+        android:id="@+id/tv_pwdEditText_minimumHint"
+        android:text="@string/email_login_register_dialog_password_edit_text_hint_minimum"
+        android:textSize="10sp"
+        android:textColor="#aeaeae"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="10dp"
+        android:layout_marginEnd="10dp"
+        app:layout_constraintRight_toRightOf="@id/et_pwdEditText_pwd"
+        app:layout_constraintTop_toTopOf="@id/et_pwdEditText_pwd"
+        app:layout_constraintBottom_toBottomOf="@id/et_pwdEditText_pwd"
+        />
+</android.support.constraint.ConstraintLayout>

+ 76 - 0
src/main/res/layout/view_email_login_form.xml

@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    >
+
+    <EditText
+        android:id="@+id/et_emailLoginForm_email"
+        style="@style/EmailLoginRegisterFormEditText"
+        android:inputType="textEmailAddress"
+        android:hint="@string/email_login_register_dialog_email_edit_text_hint"
+        android:layout_width="0dp"
+        android:layout_height="@dimen/email_login_dialog_field_height"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toTopOf="@id/et_emailLoginForm_pwd"
+        app:layout_constraintVertical_chainStyle="packed"
+        />
+
+    <com.kdanmobile.kdanloginregisterui.PwdEditText
+        android:id="@+id/et_emailLoginForm_pwd"
+        android:layout_width="0dp"
+        android:layout_height="@dimen/email_login_dialog_field_height"
+        android:layout_marginTop="10dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/et_emailLoginForm_email"
+        app:layout_constraintBottom_toTopOf="@+id/btn_emailLoginForm_login"
+        />
+
+    <Space
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:layout_constraintTop_toBottomOf="@id/et_emailLoginForm_pwd"
+        app:layout_constraintBottom_toTopOf="@+id/btn_emailLoginForm_login"
+        />
+
+    <android.support.v7.widget.AppCompatCheckBox
+        android:id="@+id/cb_emailLogin_rememberMe"
+        android:text="@string/email_login_remember_me_check_box"
+        android:textSize="12sp"
+        android:buttonTint="@color/email_login_register_form_primary_blue"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/et_emailLoginForm_pwd"
+        app:layout_constraintBottom_toTopOf="@+id/btn_emailLoginForm_login"
+        />
+
+    <TextView
+        android:id="@+id/tv_emailLogin_pwdHelp"
+        android:text="@string/email_login_pwd_help"
+        android:textColor="@color/email_login_pwd_helper"
+        android:textSize="12sp"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/et_emailLoginForm_pwd"
+        app:layout_constraintBottom_toTopOf="@+id/btn_emailLoginForm_login"
+        />
+
+    <Button
+        android:id="@+id/btn_emailLoginForm_login"
+        style="@style/EmailLoginRegisterFormSubmitBtn"
+        android:text="@string/email_register_dialog_submit_btn"
+        android:layout_width="0dp"
+        android:layout_height="36dp"
+        android:layout_marginTop="46dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/et_emailLoginForm_pwd"
+        app:layout_constraintBottom_toBottomOf="parent"
+        />
+</android.support.constraint.ConstraintLayout>

+ 59 - 0
src/main/res/layout/view_email_register_form.xml

@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    >
+
+    <EditText
+        android:id="@+id/et_emailRegisterForm_name"
+        style="@style/EmailLoginRegisterFormEditText"
+        android:inputType="text"
+        android:hint="@string/email_login_register_dialog_name_edit_text_hint"
+        android:layout_width="0dp"
+        android:layout_height="@dimen/email_login_dialog_field_height"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toTopOf="@+id/et_emailRegisterForm_email"
+        app:layout_constraintVertical_chainStyle="packed"
+        />
+
+    <EditText
+        android:id="@+id/et_emailRegisterForm_email"
+        style="@style/EmailLoginRegisterFormEditText"
+        android:inputType="textEmailAddress"
+        android:hint="@string/email_login_register_dialog_email_edit_text_hint"
+        android:layout_width="0dp"
+        android:layout_height="@dimen/email_login_dialog_field_height"
+        android:layout_marginTop="10dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/et_emailRegisterForm_name"
+        app:layout_constraintBottom_toTopOf="@id/et_emailRegisterForm_pwd"
+        />
+
+    <com.kdanmobile.kdanloginregisterui.PwdEditText
+        android:id="@+id/et_emailRegisterForm_pwd"
+        android:layout_width="0dp"
+        android:layout_height="@dimen/email_login_dialog_field_height"
+        android:layout_marginTop="10dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/et_emailRegisterForm_email"
+        app:layout_constraintBottom_toTopOf="@+id/btn_emailRegisterForm_submit"
+        />
+
+    <Button
+        android:id="@+id/btn_emailRegisterForm_submit"
+        style="@style/EmailLoginRegisterFormSubmitBtn"
+        android:text="@string/email_register_dialog_submit_btn"
+        android:layout_width="0dp"
+        android:layout_height="36dp"
+        android:layout_marginTop="20dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/et_emailRegisterForm_pwd"
+        app:layout_constraintBottom_toBottomOf="parent"
+        />
+</android.support.constraint.ConstraintLayout>

+ 21 - 0
src/main/res/values/colors.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="kdan_blue">#007aff</color>
+    <color name="or_diver">#dbdbdb</color>
+
+    <color name="colorAccent">@color/kdan_blue</color>
+
+    <color name="third_party_btn_text">#ffffff</color>
+    <color name="facebook_blue">#3b5998</color>
+    <color name="google_blue">#4285f4</color>
+    <color name="switch_text">#0169d4</color>
+    <color name="tos_pp_text">#0854ff</color>
+
+    <color name="email_login_register_form_primary_blue">#31b1fd</color>
+    <color name="email_login_register_form_bg">#e3e3e3</color>
+    <color name="email_login_register_form_input_border">#e3e3e3</color>
+
+    <color name="email_login_pwd_helper">#0169d4</color>
+
+    <color name="register_title">#96d200</color>
+</resources>

+ 16 - 0
src/main/res/values/dimens.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <dimen name="or_divider_text_size">14sp</dimen>
+
+    <dimen name="login_register_text_size">14sp</dimen>
+    <dimen name="login_register_btn_width">272dp</dimen>
+    <dimen name="login_register_btn_height">40dp</dimen>
+
+    <dimen name="tos_and_pp_text_size">12sp</dimen>
+
+    <dimen name="email_login_dialog_field_height">44dp</dimen>
+    <dimen name="email_login_dialog_field_text">14sp</dimen>
+    <dimen name="email_login_dialog_field_text_padding_left_right">12dp</dimen>
+    <dimen name="email_login_dialog_field_text_padding_top_bottom">54dp</dimen>
+    <dimen name="email_login_dialog_width">296dp</dimen>
+</resources>

+ 8 - 0
src/main/res/values/fonts.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="font_roboto">sans-serif</string>
+    <string name="font_roboto_medium">sans-serif-medium</string>
+    <string name="font_roboto_black">sans-serif-black</string>
+    <string name="font_roboto_regular">sans-serif-regular</string>
+    <string name="font_roboto_condensed">sans-serif-condensed</string>
+</resources>

+ 34 - 0
src/main/res/values/strings.xml

@@ -0,0 +1,34 @@
+<resources>
+    <string name="app_name">KdanLoginRegisterUI</string>
+
+
+    <string name="emptyImageContextDescription"></string>
+    <string name="or">or</string>
+
+    <string name="register_title">Join Kdan for Free</string>
+
+    <string name="signIn_facebook">Sign in with Facebook</string>
+    <string name="signIn_google">Sign in with Google</string>
+    <string name="signIn_email">Sign in with Email</string>
+    <string name="signUp_facebook">Sign up with Facebook</string>
+    <string name="signUp_google">Sign up with Google</string>
+    <string name="signUp_email">Sign up with Email</string>
+
+    <string name="switch_to_register">Create a new account</string>
+    <string name="switch_to_login">I already have a Kdan account</string>
+
+    <string name="terms_of_service">Terms of Service</string>
+    <string name="privacy_policy">Privacy Policy</string>
+    <string name="register_tos_and_pp_pattern">"By signing up, you agree to our %1$s and that you have read our %2$s"</string>
+
+    <string name="email_login_register_dialog_name_edit_text_hint">Name</string>
+    <string name="email_login_register_dialog_email_edit_text_hint">Email address</string>
+    <string name="email_login_register_dialog_password_edit_text_hint">Password</string>
+    <string name="email_login_register_dialog_password_edit_text_hint_minimum">(Minimum of 8 characters) </string>
+    <string name="email_login_register_dialog_name_error">Invalid user name. Please try again.</string>
+    <string name="email_login_register_dialog_email_error">Invalid email address. Please try again.</string>
+    <string name="email_login_register_dialog_pwd_error">Invalid password. Please try again.</string>
+    <string name="email_login_remember_me_check_box">Remember Me</string>
+    <string name="email_login_pwd_help">Password Help</string>
+    <string name="email_register_dialog_submit_btn">Submit</string>
+</resources>

+ 16 - 0
src/main/res/values/styles.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <style name="EmailLoginRegisterFormSubmitBtn">
+        <item name="android:background">@drawable/bg_email_login_register_form_submit_btn</item>
+        <item name="android:textColor">@android:color/white</item>
+        <item name="android:textSize">14sp</item>
+    </style>
+
+    <style name="EmailLoginRegisterFormEditText">
+        <item name="android:background">@drawable/bg_email_login_register_form_edit_text</item>
+        <item name="android:textSize">14sp</item>
+        <item name="android:textColor">#848484</item>
+        <item name="android:paddingLeft">10dp</item>
+        <item name="android:paddingRight">10dp</item>
+    </style>
+</resources>