mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 10:49:24 +02:00
Merge branch 'master' into library
Conflicts: src/org/geometerplus/android/fbreader/FBReader.java src/org/geometerplus/zlibrary/ui/android/library/ZLAndroidActivity.java
This commit is contained in:
commit
249e65b8c1
28 changed files with 24 additions and 54 deletions
|
@ -65,6 +65,7 @@
|
||||||
<node name="refillAccount" value="Doplnit účet"/>
|
<node name="refillAccount" value="Doplnit účet"/>
|
||||||
<node name="addCustomCatalog" value="Přidat katalog"/>
|
<node name="addCustomCatalog" value="Přidat katalog"/>
|
||||||
<node name="refreshCatalogsList" value="Aktualizovat katalogy"/>
|
<node name="refreshCatalogsList" value="Aktualizovat katalogy"/>
|
||||||
|
<node name="languages" toBeTranslated="true" value="Language filter"/>
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
<node name="networkBookView">
|
<node name="networkBookView">
|
||||||
|
|
|
@ -66,6 +66,7 @@
|
||||||
<node name="refillAccount" value="Konto aufladen"/>
|
<node name="refillAccount" value="Konto aufladen"/>
|
||||||
<node name="addCustomCatalog" value="Katalog hinzufügen"/>
|
<node name="addCustomCatalog" value="Katalog hinzufügen"/>
|
||||||
<node name="refreshCatalogsList" value="Liste der Kataloge aktualisieren"/>
|
<node name="refreshCatalogsList" value="Liste der Kataloge aktualisieren"/>
|
||||||
|
<node name="languages" toBeTranslated="true" value="Language filter"/>
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
<node name="networkBookView">
|
<node name="networkBookView">
|
||||||
|
|
|
@ -68,6 +68,7 @@
|
||||||
<node name="refillAccount" value="Recréditer le compte"/>
|
<node name="refillAccount" value="Recréditer le compte"/>
|
||||||
<node name="addCustomCatalog" value="Ajouter catalogue"/>
|
<node name="addCustomCatalog" value="Ajouter catalogue"/>
|
||||||
<node name="refreshCatalogsList" value="Rafraîchir"/>
|
<node name="refreshCatalogsList" value="Rafraîchir"/>
|
||||||
|
<node name="languages" toBeTranslated="true" value="Language filter"/>
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
<node name="networkBookView">
|
<node name="networkBookView">
|
||||||
|
@ -277,8 +278,6 @@
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
<node name="Preferences">
|
|
||||||
</node>
|
|
||||||
<node name="OptionsDialog">
|
<node name="OptionsDialog">
|
||||||
<node name="title" value="FBReader - Options"/>
|
<node name="title" value="FBReader - Options"/>
|
||||||
<node name="tab">
|
<node name="tab">
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
<node name="refillAccount" value="Számla feltöltése"/>
|
<node name="refillAccount" value="Számla feltöltése"/>
|
||||||
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
||||||
<node name="refreshCatalogsList" toBeTranslated="true" value="Refresh catalogs"/>
|
<node name="refreshCatalogsList" toBeTranslated="true" value="Refresh catalogs"/>
|
||||||
|
<node name="languages" toBeTranslated="true" value="Language filter"/>
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
<node name="networkBookView">
|
<node name="networkBookView">
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
<node name="refillAccount" value="Ricarica account"/>
|
<node name="refillAccount" value="Ricarica account"/>
|
||||||
<node name="addCustomCatalog" value="Aggiungi catalogo"/>
|
<node name="addCustomCatalog" value="Aggiungi catalogo"/>
|
||||||
<node name="refreshCatalogsList" toBeTranslated="true" value="Refresh catalogs"/>
|
<node name="refreshCatalogsList" toBeTranslated="true" value="Refresh catalogs"/>
|
||||||
|
<node name="languages" toBeTranslated="true" value="Language filter"/>
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
<node name="networkBookView">
|
<node name="networkBookView">
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
<node name="refillAccount" value="Пополнить счёт"/>
|
<node name="refillAccount" value="Пополнить счёт"/>
|
||||||
<node name="addCustomCatalog" value="Добавить каталог"/>
|
<node name="addCustomCatalog" value="Добавить каталог"/>
|
||||||
<node name="refreshCatalogsList" value="Обновить каталоги"/>
|
<node name="refreshCatalogsList" value="Обновить каталоги"/>
|
||||||
|
<node name="languages" value="Фильтр по языку"/>
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
<node name="networkBookView">
|
<node name="networkBookView">
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
<node name="refillAccount" value="Поповнити рахунок"/>
|
<node name="refillAccount" value="Поповнити рахунок"/>
|
||||||
<node name="addCustomCatalog" value="Додати каталог"/>
|
<node name="addCustomCatalog" value="Додати каталог"/>
|
||||||
<node name="refreshCatalogsList" value="Оновити каталоги"/>
|
<node name="refreshCatalogsList" value="Оновити каталоги"/>
|
||||||
|
<node name="languages" toBeTranslated="true" value="Language filter"/>
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
<node name="networkBookView">
|
<node name="networkBookView">
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
<node name="refillAccount" value="Tái đầy tài khoản "/>
|
<node name="refillAccount" value="Tái đầy tài khoản "/>
|
||||||
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
||||||
<node name="refreshCatalogsList" toBeTranslated="true" value="Refresh catalogs"/>
|
<node name="refreshCatalogsList" toBeTranslated="true" value="Refresh catalogs"/>
|
||||||
|
<node name="languages" toBeTranslated="true" value="Language filter"/>
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
<node name="networkBookView">
|
<node name="networkBookView">
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
<node name="refillAccount" toBeTranslated="true" value="Refill account"/>
|
<node name="refillAccount" toBeTranslated="true" value="Refill account"/>
|
||||||
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
||||||
<node name="refreshCatalogsList" toBeTranslated="true" value="Refresh catalogs"/>
|
<node name="refreshCatalogsList" toBeTranslated="true" value="Refresh catalogs"/>
|
||||||
|
<node name="languages" toBeTranslated="true" value="Language filter"/>
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
<node name="networkBookView">
|
<node name="networkBookView">
|
||||||
|
|
|
@ -37,7 +37,6 @@ import org.geometerplus.zlibrary.core.application.ZLApplication;
|
||||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
import org.geometerplus.zlibrary.core.view.ZLView;
|
import org.geometerplus.zlibrary.core.view.ZLView;
|
||||||
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
|
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
|
||||||
import org.geometerplus.zlibrary.text.model.ZLTextModel;
|
|
||||||
import org.geometerplus.zlibrary.text.view.ZLTextFixedPosition;
|
import org.geometerplus.zlibrary.text.view.ZLTextFixedPosition;
|
||||||
import org.geometerplus.zlibrary.text.view.ZLTextPosition;
|
import org.geometerplus.zlibrary.text.view.ZLTextPosition;
|
||||||
import org.geometerplus.zlibrary.text.view.ZLTextView;
|
import org.geometerplus.zlibrary.text.view.ZLTextView;
|
||||||
|
@ -45,7 +44,6 @@ import org.geometerplus.zlibrary.ui.android.library.ZLAndroidActivity;
|
||||||
import org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication;
|
import org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication;
|
||||||
import org.geometerplus.zlibrary.ui.android.R;
|
import org.geometerplus.zlibrary.ui.android.R;
|
||||||
|
|
||||||
import org.geometerplus.fbreader.bookmodel.BookModel;
|
|
||||||
import org.geometerplus.fbreader.fbreader.FBReaderApp;
|
import org.geometerplus.fbreader.fbreader.FBReaderApp;
|
||||||
import org.geometerplus.fbreader.fbreader.ActionCode;
|
import org.geometerplus.fbreader.fbreader.ActionCode;
|
||||||
import org.geometerplus.fbreader.library.Library;
|
import org.geometerplus.fbreader.library.Library;
|
||||||
|
@ -101,22 +99,6 @@ public final class FBReader extends ZLAndroidActivity {
|
||||||
@Override
|
@Override
|
||||||
protected ZLFile fileFromIntent(Intent intent) {
|
protected ZLFile fileFromIntent(Intent intent) {
|
||||||
String fileToOpen = intent.getStringExtra(BOOK_PATH_KEY);
|
String fileToOpen = intent.getStringExtra(BOOK_PATH_KEY);
|
||||||
/*
|
|
||||||
if (fileToOpen == null && Intent.ACTION_VIEW.equals(intent.getAction())) {
|
|
||||||
final Uri uri = intent.getData();
|
|
||||||
if (uri != null) {
|
|
||||||
fileToOpen = fileNameFromUri(uri);
|
|
||||||
final String scheme = uri.getScheme();
|
|
||||||
if ("content".equals(scheme)) {
|
|
||||||
final File file = new File(fileToOpen);
|
|
||||||
if (!file.exists()) {
|
|
||||||
fileToOpen = file.getParent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
intent.setData(null);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
return fileToOpen != null ? ZLFile.createFileByPath(fileToOpen) : null;
|
return fileToOpen != null ? ZLFile.createFileByPath(fileToOpen) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ import org.geometerplus.zlibrary.core.filesystem.ZLFile;
|
||||||
import org.geometerplus.fbreader.library.*;
|
import org.geometerplus.fbreader.library.*;
|
||||||
import org.geometerplus.fbreader.tree.FBTree;
|
import org.geometerplus.fbreader.tree.FBTree;
|
||||||
|
|
||||||
import org.geometerplus.android.util.AndroidUtil;
|
|
||||||
|
|
||||||
public class LibraryTabActivity extends TabActivity implements MenuItem.OnMenuItemClickListener {
|
public class LibraryTabActivity extends TabActivity implements MenuItem.OnMenuItemClickListener {
|
||||||
public static final String CURRENT_BOOK_PATH_KEY = "CurrentBookPath";
|
public static final String CURRENT_BOOK_PATH_KEY = "CurrentBookPath";
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
|
|
||||||
package org.geometerplus.android.fbreader;
|
package org.geometerplus.android.fbreader;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
import org.geometerplus.fbreader.fbreader.FBAction;
|
import org.geometerplus.fbreader.fbreader.FBAction;
|
||||||
|
|
|
@ -42,7 +42,6 @@ import org.geometerplus.zlibrary.core.image.ZLImage;
|
||||||
import org.geometerplus.zlibrary.ui.android.image.ZLAndroidImageManager;
|
import org.geometerplus.zlibrary.ui.android.image.ZLAndroidImageManager;
|
||||||
import org.geometerplus.zlibrary.ui.android.image.ZLAndroidImageData;
|
import org.geometerplus.zlibrary.ui.android.image.ZLAndroidImageData;
|
||||||
import org.geometerplus.zlibrary.ui.android.library.ZLAndroidLibrary;
|
import org.geometerplus.zlibrary.ui.android.library.ZLAndroidLibrary;
|
||||||
import org.geometerplus.zlibrary.ui.android.R;
|
|
||||||
|
|
||||||
import org.geometerplus.fbreader.network.NetworkTree;
|
import org.geometerplus.fbreader.network.NetworkTree;
|
||||||
import org.geometerplus.fbreader.network.NetworkImage;
|
import org.geometerplus.fbreader.network.NetworkImage;
|
||||||
|
|
|
@ -30,7 +30,6 @@ import android.widget.BaseAdapter;
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
import org.geometerplus.zlibrary.core.network.ZLNetworkException;
|
import org.geometerplus.zlibrary.core.network.ZLNetworkException;
|
||||||
import org.geometerplus.zlibrary.core.language.ZLLanguageUtil;
|
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.ui.android.R;
|
import org.geometerplus.zlibrary.ui.android.R;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
package org.geometerplus.android.fbreader.preferences;
|
package org.geometerplus.android.fbreader.preferences;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.preference.ListPreference;
|
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
import org.geometerplus.zlibrary.core.options.ZLIntegerRangeOption;
|
import org.geometerplus.zlibrary.core.options.ZLIntegerRangeOption;
|
||||||
|
|
|
@ -100,7 +100,6 @@ public class NetworkLibrary {
|
||||||
if (myIsAlreadyInitialized) {
|
if (myIsAlreadyInitialized) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final LinksComparator comparator = new LinksComparator();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
OPDSLinkReader.loadOPDSLinks(OPDSLinkReader.CACHE_LOAD, new OnNewLinkListener() {
|
OPDSLinkReader.loadOPDSLinks(OPDSLinkReader.CACHE_LOAD, new OnNewLinkListener() {
|
||||||
|
@ -466,6 +465,6 @@ public class NetworkLibrary {
|
||||||
for (INetworkLink link : myLinks) {
|
for (INetworkLink link : myLinks) {
|
||||||
languageSet.add(link.getLanguage());
|
languageSet.add(link.getLanguage());
|
||||||
}
|
}
|
||||||
return new ArrayList(languageSet);
|
return new ArrayList<String>(languageSet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
package org.geometerplus.fbreader.optionsDialog;
|
package org.geometerplus.fbreader.optionsDialog;
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.library.ZLibrary;
|
|
||||||
import org.geometerplus.zlibrary.core.dialogs.*;
|
import org.geometerplus.zlibrary.core.dialogs.*;
|
||||||
import org.geometerplus.zlibrary.core.optionEntries.*;
|
import org.geometerplus.zlibrary.core.optionEntries.*;
|
||||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
package org.geometerplus.fbreader.optionsDialog;
|
package org.geometerplus.fbreader.optionsDialog;
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.dialogs.ZLDialogContent;
|
import org.geometerplus.zlibrary.core.dialogs.ZLDialogContent;
|
||||||
import org.geometerplus.zlibrary.core.optionEntries.ZLFontFamilyOptionEntry;
|
|
||||||
import org.geometerplus.zlibrary.core.optionEntries.ZLSimpleBoolean3OptionEntry;
|
import org.geometerplus.zlibrary.core.optionEntries.ZLSimpleBoolean3OptionEntry;
|
||||||
import org.geometerplus.zlibrary.core.optionEntries.ZLSimpleSpinOptionEntry;
|
import org.geometerplus.zlibrary.core.optionEntries.ZLSimpleSpinOptionEntry;
|
||||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
|
@ -37,7 +36,7 @@ public class StyleOptionsPage extends OptionsPage implements FBTextKind {
|
||||||
private final static String KEY_BOLD = "bold";
|
private final static String KEY_BOLD = "bold";
|
||||||
private final static String KEY_ITALIC = "italic";
|
private final static String KEY_ITALIC = "italic";
|
||||||
private final static String KEY_FONTFAMILY = "fontFamily";
|
private final static String KEY_FONTFAMILY = "fontFamily";
|
||||||
private final static String KEY_FONTSIZE = "fontSize";
|
//private final static String KEY_FONTSIZE = "fontSize";
|
||||||
private final static String KEY_FONTSIZEDIFFERENCE = "fontSizeDifference";
|
private final static String KEY_FONTSIZEDIFFERENCE = "fontSizeDifference";
|
||||||
private final static String KEY_ALLOWHYPHENATIONS = "allowHyphenations";
|
private final static String KEY_ALLOWHYPHENATIONS = "allowHyphenations";
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ package org.geometerplus.zlibrary.core.dialogs;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
import org.geometerplus.zlibrary.core.options.*;
|
|
||||||
|
|
||||||
public abstract class ZLDialogContent {
|
public abstract class ZLDialogContent {
|
||||||
private final ZLResource myResource;
|
private final ZLResource myResource;
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
package org.geometerplus.zlibrary.core.library;
|
package org.geometerplus.zlibrary.core.library;
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.filesystem.ZLResourceFile;
|
import org.geometerplus.zlibrary.core.filesystem.ZLResourceFile;
|
||||||
import org.geometerplus.zlibrary.core.view.ZLPaintContext;
|
|
||||||
|
|
||||||
public abstract class ZLibrary {
|
public abstract class ZLibrary {
|
||||||
public static ZLibrary Instance() {
|
public static ZLibrary Instance() {
|
||||||
|
|
|
@ -43,7 +43,6 @@ public class ZLFontFamilyOptionEntry extends ZLComboOptionEntry {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String initialValue() {
|
public String initialValue() {
|
||||||
final ArrayList<String> allValues = getValues();
|
|
||||||
final String value = myOption.getValue();
|
final String value = myOption.getValue();
|
||||||
for (String v : getValues()) {
|
for (String v : getValues()) {
|
||||||
if (value.equals(myContext.realFontFamilyName(v))) {
|
if (value.equals(myContext.realFontFamilyName(v))) {
|
||||||
|
|
|
@ -107,20 +107,20 @@ public class ZLTTFInfoDetector {
|
||||||
|
|
||||||
private static class TableInfo {
|
private static class TableInfo {
|
||||||
final String Name;
|
final String Name;
|
||||||
final int CheckSum;
|
//final int CheckSum;
|
||||||
final int Offset;
|
final int Offset;
|
||||||
final int Length;
|
final int Length;
|
||||||
|
|
||||||
TableInfo(byte[] buffer, int off) throws IOException {
|
TableInfo(byte[] buffer, int off) throws IOException {
|
||||||
Name = new String(buffer, off, 4, "ascii");
|
Name = new String(buffer, off, 4, "ascii");
|
||||||
CheckSum = getInt32(buffer, off + 4);
|
//CheckSum = getInt32(buffer, off + 4);
|
||||||
Offset = getInt32(buffer, off + 8);
|
Offset = getInt32(buffer, off + 8);
|
||||||
Length = getInt32(buffer, off + 12);
|
Length = getInt32(buffer, off + 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
void print(PrintStream writer) {
|
/*void print(PrintStream writer) {
|
||||||
writer.println(Name + " : " + Offset + " : " + Length + " : " + CheckSum);
|
writer.println(Name + " : " + Offset + " : " + Length + " : " + CheckSum);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] readTable(TableInfo info) throws IOException {
|
byte[] readTable(TableInfo info) throws IOException {
|
||||||
|
@ -190,7 +190,7 @@ public class ZLTTFInfoDetector {
|
||||||
return fontInfo;
|
return fontInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int readFontProperties(TableInfo fdscInfo) throws IOException {
|
/*private int readFontProperties(TableInfo fdscInfo) throws IOException {
|
||||||
if (fdscInfo == null || fdscInfo.Offset < myPosition || fdscInfo.Length <= 16) {
|
if (fdscInfo == null || fdscInfo.Offset < myPosition || fdscInfo.Length <= 16) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -198,5 +198,5 @@ public class ZLTTFInfoDetector {
|
||||||
System.err.println(getInt32(buffer, 0));
|
System.err.println(getInt32(buffer, 0));
|
||||||
System.err.println(getInt32(buffer, 4));
|
System.err.println(getInt32(buffer, 4));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,7 @@
|
||||||
|
|
||||||
package org.geometerplus.zlibrary.ui.android.dialogs;
|
package org.geometerplus.zlibrary.ui.android.dialogs;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import android.app.*;
|
import android.app.*;
|
||||||
import android.content.*;
|
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.dialogs.*;
|
import org.geometerplus.zlibrary.core.dialogs.*;
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,6 @@ package org.geometerplus.zlibrary.ui.android.dialogs;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.view.*;
|
|
||||||
import android.widget.*;
|
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.dialogs.*;
|
import org.geometerplus.zlibrary.core.dialogs.*;
|
||||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
|
@ -31,12 +29,12 @@ import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
import org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication;
|
import org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication;
|
||||||
|
|
||||||
class ZLAndroidOptionsDialog extends ZLOptionsDialog {
|
class ZLAndroidOptionsDialog extends ZLOptionsDialog {
|
||||||
private final String myCaption;
|
//private final String myCaption;
|
||||||
private final Activity myMainActivity;
|
private final Activity myMainActivity;
|
||||||
|
|
||||||
ZLAndroidOptionsDialog(Activity activity, ZLResource resource) {
|
ZLAndroidOptionsDialog(Activity activity, ZLResource resource) {
|
||||||
super(resource);
|
super(resource);
|
||||||
myCaption = resource.getResource("title").getValue();
|
//myCaption = resource.getResource("title").getValue();
|
||||||
myMainActivity = activity;
|
myMainActivity = activity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -206,8 +206,11 @@ public abstract class ZLAndroidActivity extends Activity {
|
||||||
@Override
|
@Override
|
||||||
public void onNewIntent(Intent intent) {
|
public void onNewIntent(Intent intent) {
|
||||||
super.onNewIntent(intent);
|
super.onNewIntent(intent);
|
||||||
ZLApplication.Instance().openFile(fileFromIntent(intent));
|
|
||||||
ZLApplication.Instance().repaintView();
|
final String fileToOpen = extractFileNameFromIntent(intent);
|
||||||
|
if (fileToOpen != null) {
|
||||||
|
ZLApplication.Instance().openFile(ZLFile.createFileByPath(fileToOpen));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ZLAndroidLibrary getLibrary() {
|
private static ZLAndroidLibrary getLibrary() {
|
||||||
|
|
|
@ -23,7 +23,6 @@ import java.io.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.content.res.Resources;
|
|
||||||
import android.content.res.AssetFileDescriptor;
|
import android.content.res.AssetFileDescriptor;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
|
|
@ -27,7 +27,6 @@ import java.lang.reflect.InvocationTargetException;
|
||||||
|
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.util.ZLTTFInfo;
|
|
||||||
import org.geometerplus.zlibrary.core.util.ZLTTFInfoDetector;
|
import org.geometerplus.zlibrary.core.util.ZLTTFInfoDetector;
|
||||||
|
|
||||||
import org.geometerplus.fbreader.Paths;
|
import org.geometerplus.fbreader.Paths;
|
||||||
|
|
|
@ -26,8 +26,6 @@ import android.graphics.*;
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.image.ZLImageData;
|
import org.geometerplus.zlibrary.core.image.ZLImageData;
|
||||||
import org.geometerplus.zlibrary.core.util.ZLColor;
|
import org.geometerplus.zlibrary.core.util.ZLColor;
|
||||||
import org.geometerplus.zlibrary.core.util.ZLTTFInfo;
|
|
||||||
import org.geometerplus.zlibrary.core.util.ZLTTFInfoDetector;
|
|
||||||
import org.geometerplus.zlibrary.core.view.ZLPaintContext;
|
import org.geometerplus.zlibrary.core.view.ZLPaintContext;
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.ui.android.image.ZLAndroidImageData;
|
import org.geometerplus.zlibrary.ui.android.image.ZLAndroidImageData;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue