mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 10:19:33 +02:00
Code cleanup
This commit is contained in:
parent
384dd40b55
commit
c25f0e12fe
18 changed files with 10 additions and 34 deletions
|
@ -34,7 +34,6 @@ import android.widget.TextView;
|
|||
import org.geometerplus.zlibrary.core.application.ZLApplication;
|
||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||
import org.geometerplus.zlibrary.core.view.ZLView;
|
||||
import org.geometerplus.zlibrary.text.model.ZLTextModel;
|
||||
import org.geometerplus.zlibrary.text.view.ZLTextFixedPosition;
|
||||
import org.geometerplus.zlibrary.text.view.ZLTextPosition;
|
||||
import org.geometerplus.zlibrary.text.view.ZLTextView;
|
||||
|
@ -42,7 +41,6 @@ import org.geometerplus.zlibrary.ui.android.library.ZLAndroidActivity;
|
|||
import org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication;
|
||||
import org.geometerplus.zlibrary.ui.android.R;
|
||||
|
||||
import org.geometerplus.fbreader.bookmodel.BookModel;
|
||||
import org.geometerplus.fbreader.fbreader.FBReaderApp;
|
||||
import org.geometerplus.fbreader.fbreader.ActionCode;
|
||||
import org.geometerplus.fbreader.library.Library;
|
||||
|
|
|
@ -39,8 +39,6 @@ import org.geometerplus.zlibrary.core.filesystem.ZLFile;
|
|||
import org.geometerplus.fbreader.library.*;
|
||||
import org.geometerplus.fbreader.tree.FBTree;
|
||||
|
||||
import org.geometerplus.android.util.AndroidUtil;
|
||||
|
||||
public class LibraryTabActivity extends TabActivity implements MenuItem.OnMenuItemClickListener {
|
||||
public static final String CURRENT_BOOK_PATH_KEY = "CurrentBookPath";
|
||||
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
|
||||
package org.geometerplus.android.fbreader;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
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.ZLAndroidImageData;
|
||||
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.NetworkImage;
|
||||
|
|
|
@ -30,7 +30,6 @@ import android.widget.BaseAdapter;
|
|||
|
||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||
import org.geometerplus.zlibrary.core.network.ZLNetworkException;
|
||||
import org.geometerplus.zlibrary.core.language.ZLLanguageUtil;
|
||||
|
||||
import org.geometerplus.zlibrary.ui.android.R;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
package org.geometerplus.android.fbreader.preferences;
|
||||
|
||||
import android.content.Context;
|
||||
import android.preference.ListPreference;
|
||||
|
||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||
import org.geometerplus.zlibrary.core.options.ZLIntegerRangeOption;
|
||||
|
|
|
@ -100,7 +100,6 @@ public class NetworkLibrary {
|
|||
if (myIsAlreadyInitialized) {
|
||||
return;
|
||||
}
|
||||
final LinksComparator comparator = new LinksComparator();
|
||||
|
||||
try {
|
||||
OPDSLinkReader.loadOPDSLinks(OPDSLinkReader.CACHE_LOAD, new OnNewLinkListener() {
|
||||
|
@ -466,6 +465,6 @@ public class NetworkLibrary {
|
|||
for (INetworkLink link : myLinks) {
|
||||
languageSet.add(link.getLanguage());
|
||||
}
|
||||
return new ArrayList(languageSet);
|
||||
return new ArrayList<String>(languageSet);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
package org.geometerplus.fbreader.optionsDialog;
|
||||
|
||||
import org.geometerplus.zlibrary.core.library.ZLibrary;
|
||||
import org.geometerplus.zlibrary.core.dialogs.*;
|
||||
import org.geometerplus.zlibrary.core.optionEntries.*;
|
||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
package org.geometerplus.fbreader.optionsDialog;
|
||||
|
||||
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.ZLSimpleSpinOptionEntry;
|
||||
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_ITALIC = "italic";
|
||||
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_ALLOWHYPHENATIONS = "allowHyphenations";
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ package org.geometerplus.zlibrary.core.dialogs;
|
|||
import java.util.*;
|
||||
|
||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||
import org.geometerplus.zlibrary.core.options.*;
|
||||
|
||||
public abstract class ZLDialogContent {
|
||||
private final ZLResource myResource;
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
package org.geometerplus.zlibrary.core.library;
|
||||
|
||||
import org.geometerplus.zlibrary.core.filesystem.ZLResourceFile;
|
||||
import org.geometerplus.zlibrary.core.view.ZLPaintContext;
|
||||
|
||||
public abstract class ZLibrary {
|
||||
public static ZLibrary Instance() {
|
||||
|
|
|
@ -43,7 +43,6 @@ public class ZLFontFamilyOptionEntry extends ZLComboOptionEntry {
|
|||
}
|
||||
|
||||
public String initialValue() {
|
||||
final ArrayList<String> allValues = getValues();
|
||||
final String value = myOption.getValue();
|
||||
for (String v : getValues()) {
|
||||
if (value.equals(myContext.realFontFamilyName(v))) {
|
||||
|
|
|
@ -107,20 +107,20 @@ public class ZLTTFInfoDetector {
|
|||
|
||||
private static class TableInfo {
|
||||
final String Name;
|
||||
final int CheckSum;
|
||||
//final int CheckSum;
|
||||
final int Offset;
|
||||
final int Length;
|
||||
|
||||
TableInfo(byte[] buffer, int off) throws IOException {
|
||||
Name = new String(buffer, off, 4, "ascii");
|
||||
CheckSum = getInt32(buffer, off + 4);
|
||||
//CheckSum = getInt32(buffer, off + 4);
|
||||
Offset = getInt32(buffer, off + 8);
|
||||
Length = getInt32(buffer, off + 12);
|
||||
}
|
||||
|
||||
void print(PrintStream writer) {
|
||||
/*void print(PrintStream writer) {
|
||||
writer.println(Name + " : " + Offset + " : " + Length + " : " + CheckSum);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
byte[] readTable(TableInfo info) throws IOException {
|
||||
|
@ -190,7 +190,7 @@ public class ZLTTFInfoDetector {
|
|||
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) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -198,5 +198,5 @@ public class ZLTTFInfoDetector {
|
|||
System.err.println(getInt32(buffer, 0));
|
||||
System.err.println(getInt32(buffer, 4));
|
||||
return 0;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
|
|
@ -19,10 +19,7 @@
|
|||
|
||||
package org.geometerplus.zlibrary.ui.android.dialogs;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import android.app.*;
|
||||
import android.content.*;
|
||||
|
||||
import org.geometerplus.zlibrary.core.dialogs.*;
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ package org.geometerplus.zlibrary.ui.android.dialogs;
|
|||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.view.*;
|
||||
import android.widget.*;
|
||||
|
||||
import org.geometerplus.zlibrary.core.dialogs.*;
|
||||
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;
|
||||
|
||||
class ZLAndroidOptionsDialog extends ZLOptionsDialog {
|
||||
private final String myCaption;
|
||||
//private final String myCaption;
|
||||
private final Activity myMainActivity;
|
||||
|
||||
ZLAndroidOptionsDialog(Activity activity, ZLResource resource) {
|
||||
super(resource);
|
||||
myCaption = resource.getResource("title").getValue();
|
||||
//myCaption = resource.getResource("title").getValue();
|
||||
myMainActivity = activity;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ import java.io.*;
|
|||
import java.util.*;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.AssetFileDescriptor;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
|
|
|
@ -27,7 +27,6 @@ import java.lang.reflect.InvocationTargetException;
|
|||
|
||||
import android.graphics.Typeface;
|
||||
|
||||
import org.geometerplus.zlibrary.core.util.ZLTTFInfo;
|
||||
import org.geometerplus.zlibrary.core.util.ZLTTFInfoDetector;
|
||||
|
||||
import org.geometerplus.fbreader.Paths;
|
||||
|
|
|
@ -26,8 +26,6 @@ import android.graphics.*;
|
|||
|
||||
import org.geometerplus.zlibrary.core.image.ZLImageData;
|
||||
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.ui.android.image.ZLAndroidImageData;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue