app/src/main/java/com/treslines/pagsegurodemo/PagSeguroActivity.java
public void onProgressChanged(WebView view, int progress) {
                if(activity.getTitle().toString().equalsIgnoreCase(getString(R.string.loading_3))){
                    activity.setTitle(getString(R.string.loading_1));
                }else if(activity.getTitle().toString().equalsIgnoreCase(getString(R.string.loading_1))){
                    activity.setTitle(getString(R.string.loading_2));
                }else if(activity.getTitle().toString().equalsIgnoreCase(getString(R.string.loading_2))){
                    activity.setTitle(getString(R.string.loading_3));
                }else {
                    activity.setTitle(getString(R.string.loading_3));
                }
                activity.setProgress(progress * 100);
                if (progress == 100) {
                    activity.setTitle(view.getTitle().split(" - ")[0]);
                }
            }
// keep changing loading message till process is completed
keep changing loading message till process is completed
keep changing loading message till process is completed
public void onProgressChanged(WebView view, int progress) {
                if(activity.getTitle().toString().equalsIgnoreCase(getString(R.string.loading_3))){
                    activity.setTitle(getString(R.string.loading_1));
                }else if(activity.getTitle().toString().equalsIgnoreCase(getString(R.string.loading_1))){
                    activity.setTitle(getString(R.string.loading_2));
                }else if(activity.getTitle().toString().equalsIgnoreCase(getString(R.string.loading_2))){
                    activity.setTitle(getString(R.string.loading_3));
                }else {
                    activity.setTitle(getString(R.string.loading_3));
                }
                activity.setProgress(progress * 100);
                if (progress == 100) {
                    activity.setTitle(view.getTitle().split(" - ")[0]);
                }
            }
public void onProgressChanged ( WebView view , int progress ) { if ( activity . getTitle ( ) . toString ( ) . equalsIgnoreCase ( getString ( R . string . loading_3 ) ) ) { activity . setTitle ( getString ( R . string . loading_1 ) ) ; } else if ( activity . getTitle ( ) . toString ( ) . equalsIgnoreCase ( getString ( R . string . loading_1 ) ) ) { activity . setTitle ( getString ( R . string . loading_2 ) ) ; } else if ( activity . getTitle ( ) . toString ( ) . equalsIgnoreCase ( getString ( R . string . loading_2 ) ) ) { activity . setTitle ( getString ( R . string . loading_3 ) ) ; } else { activity . setTitle ( getString ( R . string . loading_3 ) ) ; } activity . setProgress ( progress * 100 ) ; if ( progress == 100 ) { activity . setTitle ( view . getTitle ( ) . split ( " - " ) [ 0 ] ) ; } }
keep changing loading message till process is completed
keep changing loading message till process is completed