Some small changes

This commit is contained in:
khanhduytran0 2020-03-19 17:07:50 +07:00
parent e1ce65eb29
commit 32b121cbd2
34 changed files with 27 additions and 40 deletions

View file

@ -735,47 +735,32 @@ public class MainActivity extends Activity implements OnTouchListener
appendToLog(text + "\n");
}
private boolean isLogAllowed = false;
private boolean isFirstLog = true;
private void appendToLog(final String text) {
new Thread(new Runnable(){
@Override
public void run()
{
while (!isLogAllowed) {
try {
if (isFirstLog) {
isFirstLog = false;
Thread.sleep(5000);
isLogAllowed = true;
}
Thread.sleep(100);
} catch (InterruptedException e) {}
// test skip
if (true) return;
textLog.post(new Runnable(){
private String allText;
@Override
public void run()
{
textLog.append(text);
if (toggleScrollLog.isChecked()) {
contentScroll.fullScroll(ScrollView.FOCUS_DOWN);
}
}
textLog.post(new Runnable(){
private String allText;
@Override
public void run()
{
textLog.append(text);
if (toggleScrollLog.isChecked()) {
contentScroll.fullScroll(ScrollView.FOCUS_DOWN);
}
}
});
textLogBehindGL.post(new Runnable(){
});
textLogBehindGL.post(new Runnable(){
@Override
public void run()
{
textLogBehindGL.append(text);
}
});
}
}, "PojavLoggerThread").start();
@Override
public void run()
{
textLogBehindGL.append(text);
}
});
}
public void handleMessage(Message msg) {