Skip to content

Commit

Permalink
remove ion and switch to glide for image loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd Blose committed May 8, 2016
1 parent d38f70f commit fae5864
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/github.com/getlantern/lantern-mobile/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ dependencies {
compile 'com.ogaclejapan.smarttablayout:library:1.6.0@aar'
compile 'com.ogaclejapan.smarttablayout:utils-v4:1.6.0@aar'

compile 'com.koushikdutta.ion:ion:2.+'
compile 'com.github.bumptech.glide:glide:3.7.0'

compile ('com.mandrillapp.wrapper.lutung:lutung:0.0.7') {
exclude group: 'org.apache.commons', module: 'commons-io'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
# public *;
#}

# necessary to use Glide (image caching library)
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}

-useuniqueclassmembernames
-keepattributes SourceFile,LineNumberTable
-allowaccessmodification
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.getlantern.lantern.model;

import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand All @@ -12,7 +13,7 @@

import org.getlantern.lantern.R;

import com.koushikdutta.ion.Ion;
import com.bumptech.glide.Glide;

public class FeedAdapter extends BaseAdapter {

Expand Down Expand Up @@ -68,10 +69,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
urlView.setText(item.getUrl());

if (!"".equals(item.getImage())) {
Ion.with(mContext)
.load(item.getImage())
.withBitmap()
.intoImageView(imageView);
Glide.with(mContext).load(item.getImage()).into(imageView);
}
return view;
}
Expand Down

0 comments on commit fae5864

Please sign in to comment.