32
LINES
JavaX source code (Android) - run with: the app
1 | import android.widget.*;
|
2 | import android.view.*;
|
3 | import android.content.Context;
|
4 | import android.app.Activity;
|
5 | import java.util.Timer;
|
6 | import java.util.TimerTask;
|
7 |
|
8 | public class main {
|
9 | static String text = "";
|
10 |
|
11 | public static View main(final Activity context) {
|
12 | ScrollView sv = new ScrollView(context);
|
13 |
|
14 | final TextView tv = new TextView(context);
|
15 | tv.setText("");
|
16 | sv.addView(tv);
|
17 |
|
18 | Timer myTimer = new Timer();
|
19 | myTimer.schedule(new TimerTask() {
|
20 | public void run() {
|
21 | context.runOnUiThread(new Runnable() {
|
22 | public void run() {
|
23 | text += "This is more text.\n";
|
24 | tv.setText(text);
|
25 | }
|
26 | });
|
27 | }
|
28 | }, 0, 1000);
|
29 |
|
30 | return sv;
|
31 | }
|
32 | }
|
Author comment
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, kmhbujppghqa, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
ID |
Author/Program |
Comment |
Date |
1007 | #1000604 (pitcher) | | 2015-08-20 15:28:24 |
1006 | #1000610 (pitcher) | | 2015-08-18 00:07:07 |
83 | stefan | It works!! | 2015-08-03 02:58:32 |
add comment
Snippet ID: |
#1000404 |
Snippet name: |
Growing TextView test |
Eternal ID of this version: |
#1000404/1 |
Text MD5: |
5c382c6b49d4131ca3a4043719b62c30 |
Author: |
stefan |
Category: |
javax android |
Type: |
JavaX source code (Android) |
Public (visible to everyone): |
Yes |
Archived (hidden from active list): |
No |
Created/modified: |
2015-08-03 02:57:01 |
Source code size: |
772 bytes / 32 lines |
Pitched / IR pitched: |
No / Yes |
Views / Downloads: |
1024 / 961 |
Referenced in: |
[show references] |