I have a progressDialog in my fragment. The thing I need is to show little circle. But it is showing only message. It's killing me
final ProgressDialog progressDialog = new ProgressDialog(getActivity());
progressDialog.setIndeterminate(true);
progressDialog.setMessage("My message");
progressDialog.setProgressStyle(android.R.style.Widget_ProgressBar_Large);
progressDialog.show();
Fragment - method show progress dialog is edited by your help
private void loginEmail() {
showProgressDialog();
FactoryAPI.getInstanceLogin().login("test@test.cz", "heslo123").enqueue(new Callback<UserResponse>() {
@Override
public void onResponse(Call<UserResponse> call, Response<UserResponse> response) {
if (response.isSuccessful()) {
user = response.body().getUser();
startActivity();
progressDialog.dismiss();
} else {
Toast.makeText(getContext(), R.string.email_password_is_not_right, Toast.LENGTH_LONG).show();
}
}
@Override
public void onFailure(Call<UserResponse> call, Throwable t) {
Log.e("error", "error");
}
});
}