发布于 2018-03-24 02:22:48
你可以在一个线程中做大量的事情。在您的onCreate方法中:
Thread t = new Thread() {
public void run() {
//do heavy work here
final int result=42;
runOnUiThread(new Runnable() {
@Override
public void run() {
//call methods of your views here.
textView.setText(result +"");
}
});
}
};
t.start();https://stackoverflow.com/questions/49455903
复制相似问题