Libraryless. Click here for Pure Java version (3999L/27K/102K).
1 | !7 |
2 | |
3 | set flag Android. |
4 | |
5 | p { |
6 | final EditText tvEmail = aTextInput(androidAssistant_userEmail()); |
7 | final EditText tvPW = aPasswordInput(); |
8 | final TextView tvResult = aFontSize(20, aForeground(aRed(), aCenteredTextView())); |
9 | |
10 | aShow(aVerticalStack( |
11 | aForeground(aBlack(), aBold(aFontSize(24, aCenteredTextView("Register to start using your personal assistant!")))), |
12 | aVerticalSpacer(25), |
13 | tvResult, |
14 | aVerticalSpacer(25), |
15 | aBold(aFontSize(20, aCenteredTextView("Your e-mail address:"))), |
16 | aCenterTextView(tvEmail), |
17 | aVerticalSpacer(25), |
18 | aFontSize(20, aCenteredTextView("Please choose a password:")), |
19 | aCenterTextView(tvPW), |
20 | aVerticalSpacer(30), |
21 | aButton("Register", r { |
22 | final Button btn = heldInstance(Button); |
23 | thread { |
24 | temp aTempDisable(btn); |
25 | S pw = aGetText(tvPW); |
26 | S error = assistant_checkPasswordStructure(pw); |
27 | if (nempty(error)) |
28 | ret with aSetText(tvResult, error); |
29 | temp aTempSetText(btn, "Registering..."); |
30 | aSetText(tvResult, postPage("http://botcompany.de:8083/register", email := aGetText(tvEmail), pwHash := assistant_hashPassword(pw))); |
31 | } |
32 | }))); |
33 | |
34 | aFocus(tvEmail); |
35 | aSelectAll(tvEmail); |
36 | aShowKeyboard(); |
37 | } |
Began life as a copy of #1023323
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: | #1023340 |
Snippet name: | Android registration screen test |
Eternal ID of this version: | #1023340/19 |
Text MD5: | 900d12280335da5b2238ac500f77045f |
Transpilation MD5: | ab47c1d0b18e28e0024ddb5a1cc8b34b |
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:16:01 |
Source code size: | 1272 bytes / 37 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 267 / 479 |
Version history: | 18 change(s) |
Referenced in: | [show references] |