加载spinner.setVisibility(View.GONE);
后如何触发SmartImageView
?
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity);
mUrl = getIntent().getStringExtra(URL);
Image = (SmartImageView) findViewById(R.id.ivP);
final ProgressBar spinner = (ProgressBar) findViewById(R.id.loading);
spinner.setVisibility(View.VISIBLE);
Image.setImageUrl(mUrl);
spinner.setVisibility(View.GONE);
}
最佳答案
您可以在smartImageView上使用OnCompleteListener()
所以像这样使用它。
// start the progress dialog
smartImageView.setImageUrl("Your image url", new OnCompleteListener() {
@Override
public void onComplete() {
// TODO Auto-generated method stub
// end the progress dialog
}
});
关于java - 在加载SmartImageView之前如何显示布局的进度条,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/21413384/