app/src/main/java/com/sample/MovEmt/activity/BusMapActivity.java
private void switchLoadingState() {
        runOnUiThread(() -> {
            isLoading = !isLoading;
            if (isLoading) {
                mvMap.setVisibility(View.GONE);
                pbLoad.setVisibility(View.VISIBLE);
            } else {
                mvMap.setVisibility(View.VISIBLE);
                pbLoad.setVisibility(View.GONE);
            }
        });
    }
/**
     * Use this method to show or to hide the loading component
     */
Use this method to show or to hide the loading component
Use this method to show or to hide the loading component
private void switchLoadingState() {
        runOnUiThread(() -> {
            isLoading = !isLoading;
            if (isLoading) {
                mvMap.setVisibility(View.GONE);
                pbLoad.setVisibility(View.VISIBLE);
            } else {
                mvMap.setVisibility(View.VISIBLE);
                pbLoad.setVisibility(View.GONE);
            }
        });
    }
private void switchLoadingState ( ) { runOnUiThread ( ( ) -> { isLoading = ! isLoading ; if ( isLoading ) { mvMap . setVisibility ( View . GONE ) ; pbLoad . setVisibility ( View . VISIBLE ) ; } else { mvMap . setVisibility ( View . VISIBLE ) ; pbLoad . setVisibility ( View . GONE ) ; } } ) ; }
Use this method to show or to hide the loading component
Use this method to show or to hide the loading component