我正在使用Retrofit库。在调用回调成功方法之前,如何使用进度条?
public void getMovies() {
MovieClient.getWeather().movies(MovieClient.getRandomMovie(), new Callback<MovieRequest>() {
@Override
public void success(MovieRequest movieRequest, Response response) {
Picasso.with(getApplicationContext()).load(movieRequest.getPoster()).into(image);
}
@Override
public void failure(RetrofitError error) {
Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_SHORT).show();
}
});
}