Skip to content

Instantly share code, notes, and snippets.

//code
fun loginWithUsernameAndPassword(username: String, password: String) {
liveSignInStatus.value = PasswordAuthState.LOADING
doAsync {
val resultBody = loginManager.loginWithCredential(username, password)
when (resultBody.getStatusCode()) {
200 -> liveSignInStatus.postValue(PasswordAuthState.SUCCESS)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
@luserdroid
luserdroid / material_colors.xml
Created August 16, 2017 14:12
android google material colors as arrays.xml
<?xml version="1.0" encoding="utf-8"?>
<!--
Google Material Design Color Palette for Android http://www.google.com/design/spec/style/color.html#color-ui-color-palette
Spreadsheet used to create this reosurce - http://bit.ly/mdcolor_spreadsheet
Link to this colors.xml resource file - http://bit.ly/mdcolorsxml
Harshad Kale
https://github.com/kalehv
-->