private
CustomBitCallBack cc;
public
View getView(
final
int
position, View convertView, ViewGroup parent) {
Holder H;
if
(convertView ==
null
) {
convertView = mInflater.inflate(R.layout.fragment_item, parent,
false
);
H =
new
Holder();
convertView.setTag(H);
}
else
{
H = (Holder) convertView.getTag();
}
cc =
new
CustomBitCallBack();
aQuery.id(H.thumbnail).image(List.get(position).PictureUri,
true
,
true
,
100
,
0
, cc);
}
public
class
CustomBitCallBack
extends
BitmapAjaxCallback {
@SuppressLint
(
"NewApi"
)
protected
void
callback(String url, ImageView iv, Bitmap bm, AjaxStatus status) {
AsyncBitmap thread =
new
AsyncBitmap(mContext, iv, bm);
thread.execute();
}
}
class
AsyncBitmap
extends
AsyncTask<Void, Void, Bitmap> {
@Override
protected
Bitmap doInBackground(Void... params) {
if
(bm !=
null
) {
}
return
null
;
}
@Override
protected
void
onPostExecute(Bitmap result) {
Drawable dr =
new
BitmapDrawable(cxt.getResources(), result);
iv.setBackground(dr);
super
.onPostExecute(result);
}
}