mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
NG Library view: recent books list (very slow at this moment)
ZLAndroidLibrary.createImage() method has gone
This commit is contained in:
parent
1e9396d5c2
commit
c33d802c6d
16 changed files with 189 additions and 67 deletions
|
@ -19,6 +19,11 @@
|
|||
|
||||
package org.geometerplus.fbreader.library;
|
||||
|
||||
import org.geometerplus.zlibrary.core.image.ZLImage;
|
||||
|
||||
import org.geometerplus.fbreader.formats.PluginCollection;
|
||||
import org.geometerplus.fbreader.formats.FormatPlugin;
|
||||
|
||||
public class BookTree extends LibraryTree {
|
||||
public final Book Book;
|
||||
private final boolean myShowAuthors;
|
||||
|
@ -29,10 +34,12 @@ public class BookTree extends LibraryTree {
|
|||
myShowAuthors = showAuthors;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return Book.getTitle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSummary() {
|
||||
if (!myShowAuthors) {
|
||||
return super.getSummary();
|
||||
|
@ -50,4 +57,14 @@ public class BookTree extends LibraryTree {
|
|||
}
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ZLImage createCover() {
|
||||
final FormatPlugin plugin = PluginCollection.Instance().getPlugin(Book.File);
|
||||
if (plugin != null) {
|
||||
return plugin.readCover(Book);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue