Another new face emerges — @phvismin just made waves with 16 #NFTs 🌊🔥 Huge thanks for bringing such strong energy into the NFToa ecosystem. Moves like this push us all forward 🙌 #eCash $XEC #NFTCommunity #NFTCollection #NFTCollectors #nftprimearts #CryptoMarket #CryptoRecovery pic.twitter.com/T9zkiKPDGj
— NFToa (@nftoa_) September 2, 2025
Is there a better way to display the loading process or progress while waiting for a server response other than using a spinner?
Can it also be done programmatically? so that I don't have to add the spinner component in the xml file.
By the way, spinner has its own meaning in Android, meaning there is a certain relevance when using the component. Understand more by reading the documentation HERE .
But if you really want to look different, you can use this.
ProgressDialog progress = new ProgressDialog(this);
progress.setTitle("Loading");
progress.setMessage("Wait while loading...");
progress.setCancelable(false); // disable dismiss by tapping outside of the dialog
progress.show();
// To dismiss the dialog
progress.dismiss();Or this.
ProgressDialog.show(this, "Loading", "Wait while loading...");Note: ProgressDialog is deprecated for android OREO version, please use ProgressBar instead!
Creating Anti-Dismiss Dialog Progress
progressDialog.setCanceledOnTouchOutside( false );
