1 | !752 |
2 | |
3 | concepts. |
4 | |
5 | concept UserLine { |
6 | S text; |
7 | |
8 | *() {} |
9 | *(S *text) { change(); } |
10 | } |
11 | |
12 | concept SystemAnswer { |
13 | new Ref<UserLine> userLine; |
14 | S text; |
15 | } |
16 | |
17 | static EditText tf; |
18 | static ASingleComponentPanel scp; |
19 | static UserLine userLine; |
20 | static SystemAnswer systemAnswer; |
21 | |
22 | p-android { |
23 | loadAndAutoSaveConcepts(); |
24 | androidShow(aNorthAndCenter( |
25 | tf = aCenteredTextField("What is love?"), |
26 | scp = new ASingleComponentPanel(aCenteredHtmlLabel("Yo!")))); |
27 | |
28 | aOnEnter(tf, r { |
29 | S s = str(tf.getText()).trim(); |
30 | userLine = new UserLine(s); |
31 | S answer = "Yeah. " + s; |
32 | systemAnswer = cnew(SystemAnswer, +userLine, "text", answer); |
33 | scp.setComponent(aCenteredHtmlLabel(htmlencode(answer))); |
34 | }); |
35 | } |
Began life as a copy of #1005320
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005323 |
Snippet name: | Smart Console [Android, dev.] |
Eternal ID of this version: | #1005323/1 |
Text MD5: | 19ae2f609a8792b4563d98fe4ccb6471 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX source code (Android) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-11-05 14:51:05 |
Source code size: | 743 bytes / 35 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 523 / 536 |
Referenced in: | [show references] |