我正在使用 AndroidQuery 处理图像的方式保存然后保存到 sd 卡。但是由于某种原因没有显示对话框。图像已正确保存在 sd 卡中,只有对话框是问题所在。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="100dip"
>
<ProgressBar
android:layout_width="15dip"
android:layout_height="15dip"
android:id="@+id/progress"
android:layout_centerInParent="true"
/>
<ImageView
android:id="@+id/image"
android:layout_width="fill_parent"
android:layout_height="75dip"
/>
</RelativeLayout>
代码:
String url = path;
File ext = Environment.getExternalStorageDirectory();
File target = new File(ext, "Folder/Folder/" + pathName + ".jpg");
laQuery.progress(R.id.progress).download(url, target, new AjaxCallback<File>() {
public void callback(String url, File file, AjaxStatus status) {
if (file != null) {
// Log.d("File:" + file.length() + ":" + file, status);
Log.i("Aquery not null", "File:" + file.length());
Log.i("Aquery not null", "File:" + file);
Log.i("Aquery not null", "File:" + status);
} else {
Log.d("Failed", "" + status);
}
}
});