1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 17:59:33 +02:00
This commit is contained in:
Zsombor 2016-12-07 03:44:14 +00:00 committed by GitHub
commit 7509ea9245
17 changed files with 75 additions and 11 deletions

View file

@ -20,6 +20,9 @@
<node name="recent" value="Recent">
<node name="summary" value="Recently opened books"/>
</node>
<node name="recentDownloads" value="Recent Downloads">
<node name="summary" value="Recently downloaded books"/>
</node>
<node name="favorites" value="Favourites">
<node name="summary" value="My favourite books"/>
</node>

View file

@ -20,6 +20,9 @@
<node name="recent" value="Recent">
<node name="summary" value="Recently opened books"/>
</node>
<node name="recentDownloads" value="Recent Downloads">
<node name="summary" value="Recently downloaded books"/>
</node>
<node name="favorites" value="Favorites">
<node name="summary" value="My favorite books"/>
</node>

View file

@ -20,6 +20,9 @@
<node name="recent" value="Legutóbbi">
<node name="summary" value="Legutóbb megnyitott könyvek"/>
</node>
<node name="recentDownloads" value="Legújabb letöltések">
<node name="summary" value="Legutóbb letöltött könyvek"/>
</node>
<node name="favorites" value="Kedvencek">
<node name="summary" value="Kedvencnek jelölt könyveim"/>
</node>

View file

@ -21,7 +21,7 @@ package org.geometerplus.fbreader.library;
import java.util.*;
import org.fbreader.util.NaturalOrderComparator;
import group.pals.android.lib.ui.filechooser.utils.NaturalOrderComparator;
import org.fbreader.util.Pair;
import org.geometerplus.zlibrary.core.filesystem.ZLFile;

View file

@ -39,6 +39,7 @@ public abstract class LibraryTree extends FBTree {
static final String ROOT_FOUND = "found";
static final String ROOT_FAVORITES = "favorites";
static final String ROOT_RECENT = "recent";
static final String ROOT_RECENT_DOWNLOADS = "recentDownloads";
static final String ROOT_BY_AUTHOR = "byAuthor";
static final String ROOT_BY_TITLE = "byTitle";
static final String ROOT_BY_SERIES = "bySeries";

View file

@ -0,0 +1,41 @@
/*
* Copyright (C) 2009-2015 FBReader.ORG Limited <contact@fbreader.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
package org.geometerplus.fbreader.library;
import org.geometerplus.fbreader.book.Book;
public class RecentDownloadedBooksTree extends FirstLevelTree {
RecentDownloadedBooksTree(RootTree root) {
super(root, ROOT_RECENT_DOWNLOADS);
}
@Override
public Status getOpeningStatus() {
return Status.ALWAYS_RELOAD_BEFORE_OPENING;
}
@Override
public void waitForOpening() {
clear();
for (Book book : Collection.recentlyAddedBooks(12)) {
new BookWithAuthorsTree(this, book);
}
}
}

View file

@ -33,6 +33,7 @@ public class RootTree extends LibraryTree {
//new ExternalViewTree(this);
new FavoritesTree(this);
new RecentBooksTree(this);
new RecentDownloadedBooksTree(this);
new AuthorListTree(this);
new TitleListTree(this);
new SeriesListTree(this);

View file

@ -26,7 +26,7 @@ import java.util.Map;
import android.annotation.TargetApi;
import android.os.Build;
import org.fbreader.util.NaturalOrderComparator;
import group.pals.android.lib.ui.filechooser.utils.NaturalOrderComparator;
public abstract class TitledEntity<T extends TitledEntity<T>> implements Comparable<T> {
private static final NaturalOrderComparator ourComparator = new NaturalOrderComparator();

View file

@ -4,7 +4,7 @@
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<property file="local.properties" />
<property file="../../local.properties" />
<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.

View file

@ -11,4 +11,4 @@ android.library=true
# Indicates whether an apk should be generated for each density.
split.density=false
# Project target.
target=android-11
target=android-19

View file

@ -4,7 +4,7 @@
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<property file="local.properties" />
<property file="../../local.properties" />
<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.

View file

@ -4,7 +4,7 @@
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<property file="local.properties" />
<property file="../../../local.properties" />
<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.

View file

@ -8,5 +8,5 @@
# project structure.
# Project target.
target=android-14
target=android-19
android.library=true

View file

@ -13,7 +13,7 @@ import group.pals.android.lib.ui.filechooser.services.IFileProvider;
import java.util.Comparator;
import org.fbreader.util.NaturalOrderComparator;
import group.pals.android.lib.ui.filechooser.utils.NaturalOrderComparator;
/**
* {@link IFile} comparator.<br>

View file

@ -1,4 +1,4 @@
package org.fbreader.util;
package group.pals.android.lib.ui.filechooser.utils;
/*
NaturalOrderComparator.java -- Perform 'natural order' comparisons of strings in Java.

View file

@ -4,7 +4,7 @@
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<property file="local.properties" />
<property file="../../../local.properties" />
<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.
@ -78,6 +78,17 @@
in order to avoid having your file be overridden by tools such as "android update project"
-->
<!-- version-tag: 1 -->
<!-- because of this: https://code.google.com/p/android/issues/detail?id=33194, this target is needed to use jar.libs.dir -->
<target name="-pre-compile">
<echo>Custom pre-compile!</echo>
<path id="project.all.jars.path">
<fileset dir="${jar.libs.dir}">
<include name="*.jar"/>
</fileset>
</path>
</target>
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>

View file

@ -12,4 +12,5 @@
android.library=true
# Project target.
target=android-5
target=android-19
jar.libs.dir=../../../libs