Commit 11893cf4 authored by Румен Петров's avatar Румен Петров
Browse files

use lambda expression to animate "export path" widget

parent c8f8664b
......@@ -73,23 +73,7 @@ public class MainActivity extends AppCompatActivity {
final TextView export_path = findViewById(R.id.export_path);
export_path.setVisibility(View.GONE);
export_path.post(new Runnable() {
@Override
public void run() {
for (int k = 100; k > 0; k--) {
if (com.termoneplus.securebox.Application.bindir != null) break;
try {
this.wait(100);
} catch (InterruptedException e) {
//e.printStackTrace();
}
}
if (com.termoneplus.securebox.Application.bindir == null) return;
animateExportPath(export_path);
}
});
export_path.post(() -> animateExportPath(export_path));
install_terminal = findViewById(R.id.install_terminal);
install_terminal.setOnClickListener(
......@@ -191,6 +175,16 @@ public class MainActivity extends AppCompatActivity {
}
private void animateExportPath(TextView export_path) {
for (int k = 100; k > 0; k--) {
if (Application.bindir != null) break;
try {
wait(100/*milliseconds*/);
} catch (InterruptedException e) {
//e.printStackTrace();
}
}
if (Application.bindir == null) return;
{
Resources res = getResources();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment