Answer the question
In order to leave comments, you need to log in
How does progressbar work in android?
Such a question has ripened, there is a handling of the button click event:
pbLoader2 = (ProgressBar) findViewById(R.id.progressBar);
===много кода====
public void onClick(View v) {
Bitmap bitmap = ((BitmapDrawable) fullImageView.getDrawable())
.getBitmap();
switch (v.getId()) {
case R.id.llDownloadWallpaper:
pbLoader2.setVisibility(View.VISIBLE);
utils.saveImageToSDCard(bitmap);
break;
case R.id.llSetWallpaper:
pbLoader2.setVisibility(View.VISIBLE);
utils.setAsWallpaper(bitmap);
break;
default:
break;
}
}
Answer the question
In order to leave comments, you need to log in
Tabulation in the code is terrible, which is inconvenient to read.
By default, set the android:visibility of the progressbar to invisible or GONE, when clicked, set the value to VISIBLE and that's it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question