| Chunk |
|---|
| Conflicting content |
|---|
// static private final String TAG = BitmapCache.class.getCanonicalName();
public BitmapCache() {
<<<<<<< HEAD
mBitmapCache = new LruCache |
| Solution content |
|---|
// static private final String TAG = BitmapCache.class.getCanonicalName();
public BitmapCache() {
mBitmapCache = new LruCache |
| File |
|---|
| BitmapCache.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
package za.co.immedia.bitmapdownloader; <<<<<<< HEAD import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.HashMap; import java.util.concurrent.RejectedExecutionException; import android.annotation.SuppressLint; ======= import android.annotation.TargetApi; >>>>>>> 7f83d3baecea3ab6f0e78c77cdbe8d02d0cb01aa import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.drawable.BitmapDrawable; |
| Solution content |
|---|
package za.co.immedia.bitmapdownloader; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.HashMap; import java.util.concurrent.RejectedExecutionException; import za.co.immedia.bitmapdownloader.BitmapTransitionDrawable.BitmapTransitionCallback; import android.annotation.SuppressLint; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.drawable.BitmapDrawable; |
| File |
|---|
| BitmapDownloader.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
@TargetApi(11)
return false;
}
<<<<<<< HEAD
@SuppressLint("NewApi")
=======
>>>>>>> 7f83d3baecea3ab6f0e78c77cdbe8d02d0cb01aa
private void loadFromDisk(ImageView imageView) {
if (imageView != null && !mIsCancelled) {
mBitmapLoaderTask = new BitmapLoaderTask(imageView, this); |
| Solution content |
|---|
}
@SuppressLint("NewApi")
return false;
private void loadFromDisk(ImageView imageView) {
if (imageView != null && !mIsCancelled) {
mBitmapLoaderTask = new BitmapLoaderTask(imageView, this); |
| File |
|---|
| BitmapDownloader.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Chunk |
|---|
| Conflicting content |
|---|
current = new ColorDrawable(Color.TRANSPARENT);
}
Drawable[] layers = { current, d };
<<<<<<< HEAD
BitmapTransitionDrawable drawable = new BitmapTransitionDrawable(layers);
drawable.setTransitionCallback(new BitmapTransitionCallback() {
@Override
public void onStarted() {
}
@Override
public void onEnded() {
ImageView imageView = getImageView();
// the imageview tag must be null as we've already removed
// ourselves as the tag from the imageview. If a new downloader is
// using the imageview, ir would have set itself as the tag
if (imageView != null && imageView.getTag() == null) {
Drawable d = ((BitmapTransitionDrawable) imageView.getDrawable()).getDrawable(1);
imageView.setImageDrawable(d);
if (mCallback != null) {
mCallback.onLoaded(imageView);
}
}
}
});
=======
TransitionDrawable drawable = new TransitionDrawable(layers);
>>>>>>> 7f83d3baecea3ab6f0e78c77cdbe8d02d0cb01aa
imageView.setImageDrawable(drawable);
drawable.setCrossFadeEnabled(true); // fade out the old image
drawable.startTransition(200); |
| Solution content |
|---|
current = new ColorDrawable(Color.TRANSPARENT);
}
Drawable[] layers = { current, d };
BitmapTransitionDrawable drawable = new BitmapTransitionDrawable(layers);
drawable.setTransitionCallback(new BitmapTransitionCallback() {
@Override
public void onStarted() {
}
@Override
public void onEnded() {
ImageView imageView = getImageView();
// the imageview tag must be null as we've already removed
// ourselves as the tag from the imageview. If a new downloader is
// using the imageview, ir would have set itself as the tag
if (imageView != null && imageView.getTag() == null) {
Drawable d = ((BitmapTransitionDrawable) imageView.getDrawable()).getDrawable(1);
imageView.setImageDrawable(d);
if (mCallback != null) {
mCallback.onLoaded(imageView);
}
}
}
});
imageView.setImageDrawable(drawable);
drawable.setCrossFadeEnabled(true); // fade out the old image
drawable.startTransition(200); |
| File |
|---|
| BitmapDownloader.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
protected Bitmap doInBackground(String... params) {
mUrl = params[0];
<<<<<<< HEAD
String filename = Utilities.md5(mUrl);
=======
if( mUrl == null){
return null;
}
String filename = md5(mUrl);
>>>>>>> 7f83d3baecea3ab6f0e78c77cdbe8d02d0cb01aa
Bitmap bitmap = null;
if (isCancelled()) {
return null; |
| Solution content |
|---|
@Override
protected Bitmap doInBackground(String... params) {
mUrl = params[0];
if (mUrl == null) {
return null;
}
String filename = Utilities.md5(mUrl);
Bitmap bitmap = null;
if (isCancelled()) {
return null; |
| File |
|---|
| BitmapLoaderTask.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Variable |