w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Is it a good practice to pass an object of Android Activity to a Thread class' constructor?

In your case, no it is not, since only the UI Thread can touch the UI, your code will make your application crashes with

android.view.ViewRoot$CalledFromWrongThreadException




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.