Skip to content

Commit

Permalink
Minor changes to AsyncImageView and it's documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kennydude committed May 24, 2011
1 parent 2718c78 commit 9a20daf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Docs/asyncimageview.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ To start with, add two integers to your data item (you don't need to set them) a
DailyboothItem y = (DailyboothItem)DailyboothFeedAdapter.this.getItem(i);
y.width = width;
y.height = height;
DailyboothFeedAdapter.this.remove(y);
DailyboothFeedAdapter.this.insert(y, i); // update
DailyboothView.this.images_to_show.set(i, y); // update
}
});
if(xy.width != null){ // cached
Expand Down
6 changes: 3 additions & 3 deletions GreenDroid/src/greendroid/widget/AsyncImageView.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ public static interface OnViewSizeListener{
private ImageProcessor mImageProcessor;
private BitmapFactory.Options mOptions;

public Integer mWidth;
public Integer mHeight;
public Integer mWidth = -1;
public Integer mHeight = -1;

public AsyncImageView(Context context) {
this(context, null);
Expand Down Expand Up @@ -453,7 +453,7 @@ public Parcelable onSaveInstanceState() {

@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if(this.mWidth == null){ // Not measured
if(this.mWidth == -1){ // Not measured
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
if(this.mBitmap != null){
this.mWidth = getMeasuredWidth();
Expand Down

0 comments on commit 9a20daf

Please sign in to comment.