Black like button + less threads

This commit is contained in:
Sagi Dayan 2016-07-10 15:35:41 +03:00
parent 0c2e3f852b
commit 1009fe2467
3 changed files with 8 additions and 3 deletions

View file

@ -147,7 +147,11 @@ public class Utils {
} }
public static void URLtoImageView(ImageView iv, String url){ public static void URLtoImageView(ImageView iv, String url){
new setUserAvatar(iv, url).execute(); if(bitmapHash.containsKey(url)){
iv.setImageBitmap(bitmapHash.get(url));
}else{
new setUserAvatar(iv, url).execute();
}
} }
private static class setUserAvatar extends AsyncTask<Void, Void, Bitmap> { private static class setUserAvatar extends AsyncTask<Void, Void, Bitmap> {

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -141,8 +141,9 @@
android:layout_width="20dp" android:layout_width="20dp"
android:layout_height="20dp" android:layout_height="20dp"
android:id="@+id/imageView9" android:id="@+id/imageView9"
android:src="@drawable/like_icon" android:layout_gravity="center_vertical"
android:layout_gravity="center_vertical" /> android:background="@drawable/like_icon_black"
android:backgroundTintMode="multiply" />
<TextView <TextView
android:id="@+id/ndf_likes_textview" android:id="@+id/ndf_likes_textview"