summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
Diffstat (limited to 'sample')
-rw-r--r--sample/src/com/example/bitmapsample/BitmapRequestKeyImpl.java5
-rw-r--r--sample/src/com/example/bitmapsample/BitmapView.java7
-rw-r--r--sample/src/com/example/bitmapsample/MainActivity.java4
3 files changed, 8 insertions, 8 deletions
diff --git a/sample/src/com/example/bitmapsample/BitmapRequestKeyImpl.java b/sample/src/com/example/bitmapsample/BitmapRequestKeyImpl.java
index 639f4f5..6c375f1 100644
--- a/sample/src/com/example/bitmapsample/BitmapRequestKeyImpl.java
+++ b/sample/src/com/example/bitmapsample/BitmapRequestKeyImpl.java
@@ -16,8 +16,6 @@
package com.example.bitmapsample;
-import android.os.ParcelFileDescriptor;
-
import com.android.bitmap.RequestKey;
import java.io.IOException;
@@ -65,7 +63,8 @@ public class BitmapRequestKeyImpl implements RequestKey {
}
@Override
- public ParcelFileDescriptor createFd() throws IOException {
+ public Cancelable createFileDescriptorFactoryAsync(final RequestKey key,
+ final Callback callback) {
return null;
}
diff --git a/sample/src/com/example/bitmapsample/BitmapView.java b/sample/src/com/example/bitmapsample/BitmapView.java
index d8de0c9..f192963 100644
--- a/sample/src/com/example/bitmapsample/BitmapView.java
+++ b/sample/src/com/example/bitmapsample/BitmapView.java
@@ -19,9 +19,10 @@ package com.example.bitmapsample;
import android.content.Context;
import android.util.AttributeSet;
-import com.android.bitmap.view.BasicImageView;
+import com.android.bitmap.drawable.BasicBitmapDrawable;
+import com.android.bitmap.view.BitmapDrawableImageView;
-public class BitmapView extends BasicImageView {
+public class BitmapView extends BitmapDrawableImageView {
private float mDensity;
public BitmapView(Context c) {
@@ -40,6 +41,6 @@ public class BitmapView extends BasicImageView {
@Override
protected void onSizeChanged(final int w, final int h, int oldw, int oldh) {
- getDrawable().setDecodeDimensions(w, h);
+ getBasicBitmapDrawable().setDecodeDimensions(w, h);
}
} \ No newline at end of file
diff --git a/sample/src/com/example/bitmapsample/MainActivity.java b/sample/src/com/example/bitmapsample/MainActivity.java
index f580dd8..4ad18e5 100644
--- a/sample/src/com/example/bitmapsample/MainActivity.java
+++ b/sample/src/com/example/bitmapsample/MainActivity.java
@@ -93,9 +93,9 @@ public class MainActivity extends Activity {
v = new BitmapView(MainActivity.this);
final BasicBitmapDrawable drawable = new BasicBitmapDrawable(getResources(), mCache,
true /* limit density */);
- v.setDrawable(drawable);
+ v.setBasicBitmapDrawable(drawable);
}
- v.getDrawable().bind(new BitmapRequestKeyImpl(mItems[position]));
+ v.getBasicBitmapDrawable().bind(new BitmapRequestKeyImpl(mItems[position]));
return v;
}
}