Libraryless. Click here for Pure Java version (3987L/27K/101K).
!7 set flag Android. p { final EditText tvEmail = aTextInput(androidAssistant_userEmail()); final EditText tvPW = aPasswordInput(); final TextView tvResult = aFontSize(20, aForeground(aRed(), aCenteredTextView())); aShow(aVerticalStack( aForeground(aBlack(), aBold(aFontSize(24, aCenteredTextView("Log in to your assistant!")))), aVerticalSpacer(25), tvResult, aVerticalSpacer(25), aBold(aFontSize(20, aCenteredTextView("Your e-mail address:"))), aCenterTextView(tvEmail), aVerticalSpacer(25), aFontSize(20, aCenteredTextView("Password:")), aCenterTextView(tvPW), aVerticalSpacer(30), aButton("Log in", r { fS mail = trim(aGetText(tvEmail)); if (empty(mail)) ret with aSetText(tvResult, "Please enter your e-mail address"); if (!isValidEmailAddress_simple(mail)) ret with aSetText(tvResult, "Invalid e-mail address"); S pw = trim(aGetText(tvPW)); saveTextFile(androidAssistant_userEmailFile(), mail); if (empty(pw)) ret with aSetText(tvResult, "Please enter the password!"); fS hash = assistant_hashPassword(pw); saveTextFile(androidAssistant_hashedPWFile(), hash); final Button btn = heldInstance(Button); thread { temp aTempDisable(btn); temp aTempSetText(btn, "Logging in..."); aSetText(tvResult, postPage("http://botcompany.de:8083/checkPW", email := mail, pwHash := hash)); } }))); }
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, odkhaoglnmdk, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023323 |
Snippet name: | Android login screen test |
Eternal ID of this version: | #1023323/25 |
Text MD5: | 1242ac117b18996973921741415ec6a6 |
Transpilation MD5: | 82773fd45ffe436f1e55092f8b35f6fc |
Author: | stefan |
Category: | javax / android |
Type: | JavaX source code (Android) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-06-07 10:05:19 |
Source code size: | 1514 bytes / 43 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 264 / 537 |
Version history: | 24 change(s) |
Referenced in: | #1023340 - Android registration screen test |