What is the best way to show a loading spinner while the app is waiting for a response from the server?
Can this be done programmatically? So that I don\'t have to a
ProgressDialog has become deprecated since API Level 26 https://developer.android.com/reference/android/app/ProgressDialog.html
I include a ProgressBar in my layout
and change its visibility to .GONE | .VISIBLE depending on the use case.
progressBar_cyclic.visibility = View.VISIBLE