mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 13:51:50 +01:00
Rename library holder
This commit is contained in:
parent
13b4f5c385
commit
c88d8f0ded
@ -1,6 +1,5 @@
|
|||||||
package eu.kanade.mangafeed.data.models;
|
package eu.kanade.mangafeed.data.models;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
|
||||||
import com.pushtorefresh.storio.sqlite.annotations.StorIOSQLiteColumn;
|
import com.pushtorefresh.storio.sqlite.annotations.StorIOSQLiteColumn;
|
||||||
|
@ -16,7 +16,7 @@ public class LibraryAdapter<T> extends EasyAdapter<T> implements Filterable {
|
|||||||
Filter filter;
|
Filter filter;
|
||||||
|
|
||||||
public LibraryAdapter(Context context) {
|
public LibraryAdapter(Context context) {
|
||||||
super(context, MangaLibraryHolder.class);
|
super(context, LibraryHolder.class);
|
||||||
filter = new CatalogueFilter();
|
filter = new CatalogueFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import android.widget.ImageView;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||||
|
|
||||||
import eu.kanade.mangafeed.R;
|
import eu.kanade.mangafeed.R;
|
||||||
import eu.kanade.mangafeed.data.models.Manga;
|
import eu.kanade.mangafeed.data.models.Manga;
|
||||||
@ -15,7 +16,7 @@ import uk.co.ribot.easyadapter.annotations.ViewId;
|
|||||||
|
|
||||||
|
|
||||||
@LayoutId(R.layout.item_library)
|
@LayoutId(R.layout.item_library)
|
||||||
public class MangaLibraryHolder extends ItemViewHolder<Manga> {
|
public class LibraryHolder extends ItemViewHolder<Manga> {
|
||||||
|
|
||||||
@ViewId(R.id.thumbnailImage)
|
@ViewId(R.id.thumbnailImage)
|
||||||
ImageView mThumbImage;
|
ImageView mThumbImage;
|
||||||
@ -26,7 +27,7 @@ public class MangaLibraryHolder extends ItemViewHolder<Manga> {
|
|||||||
@ViewId(R.id.unreadText)
|
@ViewId(R.id.unreadText)
|
||||||
TextView mUnreadText;
|
TextView mUnreadText;
|
||||||
|
|
||||||
public MangaLibraryHolder(View view) {
|
public LibraryHolder(View view) {
|
||||||
super(view);
|
super(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,8 +40,16 @@ public class MangaLibraryHolder extends ItemViewHolder<Manga> {
|
|||||||
else {
|
else {
|
||||||
mUnreadText.setVisibility(View.GONE);
|
mUnreadText.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String thumbnail;
|
||||||
|
if (manga.thumbnail_url != null)
|
||||||
|
thumbnail = manga.thumbnail_url;
|
||||||
|
else
|
||||||
|
thumbnail = "http://img1.wikia.nocookie.net/__cb20090524204255/starwars/images/thumb/1/1a/R2d2.jpg/400px-R2d2.jpg";
|
||||||
|
|
||||||
Glide.with(getContext())
|
Glide.with(getContext())
|
||||||
.load("http://img1.wikia.nocookie.net/__cb20090524204255/starwars/images/thumb/1/1a/R2d2.jpg/400px-R2d2.jpg")
|
.load(thumbnail)
|
||||||
|
.diskCacheStrategy(DiskCacheStrategy.RESULT)
|
||||||
.centerCrop()
|
.centerCrop()
|
||||||
.into(mThumbImage);
|
.into(mThumbImage);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user