Commit b339e22f authored by axet's avatar axet 🍄

modify source

parent 7aefa836
This diff is collapsed.
/*
* Copyright (C) 2013 Paragon Software Group
* Author: Andrey Tumanov <Andrey_Tumanov@penreader.com>
*
* 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 com.paragon.dictionary.fbreader;
import java.io.FileOutputStream;
import java.util.ArrayList;
import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.webkit.WebView;
import android.widget.*;
import com.paragon.open.dictionary.api.*;
import org.geometerplus.zlibrary.core.util.MiscUtil;
import org.geometerplus.zlibrary.ui.android.R;
public class OpenDictionaryActivity extends Activity {
public final static String OPEN_DICTIONARY_QUERY_KEY = "open_dictionary_query";
public final static String OPEN_DICTIONARY_HEIGHT_KEY = "open_dictionary_height";
public final static String OPEN_DICTIONARY_GRAVITY_KEY = "open_dictionary_gravity";
private WebView myArticleView = null;
private TextView myTitleLabel = null;
private ImageButton myOpenDictionaryButton = null;
private String myQuery = null;
private int myHeight;
private int myGravity;
private static Dictionary ourDictionary = null;
static void setDictionary(Dictionary dictionary) {
ourDictionary = dictionary;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.opendictionary_flyout);
myArticleView = (WebView) findViewById(R.id.opendictionary_article_view);
myTitleLabel = (TextView) findViewById(R.id.opendictionary_title_label);
myOpenDictionaryButton = (ImageButton) findViewById(R.id.opendictionary_open_button);
myOpenDictionaryButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
openTextInDictionary(myQuery);
}
});
}
@Override
protected void onResume() {
super.onResume();
myQuery = getIntent().getStringExtra(OPEN_DICTIONARY_QUERY_KEY);
if (myQuery == null)
myQuery = "";
myHeight = getIntent().getIntExtra(OPEN_DICTIONARY_HEIGHT_KEY, -1);
myGravity = getIntent().getIntExtra(OPEN_DICTIONARY_GRAVITY_KEY, android.view.Gravity.BOTTOM);
setViewSize(myHeight, myGravity);
myArticleView.loadData("", "text/text", "UTF-8");
if (ourDictionary != null) {
myTitleLabel.setText(ourDictionary.getName());
Log.d("FBReader", "OpenDictionaryActivity: get translation as text");
ourDictionary.getTranslationAsText(myQuery, TranslateMode.SHORT, TranslateFormat.HTML, new Dictionary.TranslateAsTextListener() {
@Override
public void onComplete(String s, TranslateMode translateMode) {
final String url = saveArticle(s.replace("</BODY>", "<br><br></BODY>"), getApplicationContext());
if (MiscUtil.isEmptyString(url)) {
openTextInDictionary(myQuery);
} else {
myArticleView.loadUrl(url);
}
Log.d("FBReader", "OpenDictionaryActivity: translation ready");
}
@Override
public void onWordNotFound(ArrayList<String> similarWords) {
finish();
openTextInDictionary(myQuery);
Log.d("FBReader", "OpenDictionaryActivity: word not found");
}
@Override
public void onError(com.paragon.open.dictionary.api.Error error) {
finish();
Log.e("FBReader", error.getName());
Log.e("FBReader", error.getMessage());
}
@Override
public void onIPCError(String s) {
finish();
Log.e("FBReader", s);
}
});
}
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
setViewSize(myHeight, myGravity);
}
private void setViewSize(int height, int gravity) {
final DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
if (height < 0)
height = metrics.heightPixels / 3;
TableRow bottomRow = (TableRow)findViewById(R.id.bottom_row);
TableRow topRow = (TableRow)findViewById(R.id.top_row);
View.OnTouchListener touchListener = new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
finish();
return false;
}
};
topRow.setOnTouchListener(touchListener);
bottomRow.setOnTouchListener(touchListener);
switch (gravity) {
case android.view.Gravity.TOP:
topRow.setMinimumHeight(0);
bottomRow.setMinimumHeight(metrics.heightPixels - height);
break;
case android.view.Gravity.BOTTOM:
default:
bottomRow.setMinimumHeight(0);
topRow.setMinimumHeight(metrics.heightPixels - height);
break;
}
}
private void openTextInDictionary(String text) {
if (ourDictionary != null)
ourDictionary.showTranslation(text);
}
private String saveArticle(String data, Context context) {
final String filename = "open_dictionary_article.html";
final FileOutputStream outputStream;
try {
outputStream = context.openFileOutput(filename, Context.MODE_PRIVATE);
outputStream.write(data.getBytes());
outputStream.close();
} catch (Exception e) {
e.printStackTrace();
return null;
}
return "file://" + context.getFilesDir().getAbsolutePath() + "/" + filename;
}
}
/*
* Copyright (C) 2013 Paragon Software Group
* Author: Andrey Tumanov <Andrey_Tumanov@penreader.com>
*
* 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 com.paragon.dictionary.fbreader;
import java.util.HashSet;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.paragon.open.dictionary.api.*;
import org.geometerplus.android.fbreader.dict.DictionaryUtil;
public class OpenDictionaryFlyout {
private final Direction myDirection;
private final String myPackageName;
public OpenDictionaryFlyout(Dictionary dictionary) {
myDirection = dictionary.getDirection();
myPackageName = dictionary.getApplicationPackageName();
}
private Dictionary getDictionary(final Context context) {
if (myPackageName == null) {
return null;
}
final OpenDictionaryAPI api = new OpenDictionaryAPI(context);
HashSet<Dictionary> dictionaries = api.getDictionaries(myDirection);
for (Dictionary dictionary : dictionaries) {
if (myPackageName.equalsIgnoreCase(dictionary.getApplicationPackageName())) {
return dictionary;
}
}
Log.e("FBReader", "OpenDictionaryFlyout:getDictionary - Dictionary with direction [" +
myDirection.toString() + "] and package name [" + myPackageName + "] not found");
return null;
}
public void showTranslation(final Activity activity, final String text, DictionaryUtil.PopupFrameMetric frameMetrics) {
Log.d("FBReader", "OpenDictionaryFlyout:showTranslation");
final Dictionary dictionary = getDictionary(activity);
if (dictionary == null) {
Log.e("FBReader", "OpenDictionaryFlyout:showTranslation - null dictionary received");
return;
}
if (!dictionary.isTranslationAsTextSupported()) {
dictionary.showTranslation(text);
} else {
OpenDictionaryActivity.setDictionary(dictionary);
Intent intent = new Intent(activity, OpenDictionaryActivity.class);
intent.putExtra(OpenDictionaryActivity.OPEN_DICTIONARY_QUERY_KEY, text);
intent.putExtra(OpenDictionaryActivity.OPEN_DICTIONARY_HEIGHT_KEY, frameMetrics.Height);
intent.putExtra(OpenDictionaryActivity.OPEN_DICTIONARY_GRAVITY_KEY, frameMetrics.Gravity);
activity.startActivity(intent);
}
}
}
......@@ -35,22 +35,22 @@ import org.geometerplus.zlibrary.ui.android.R;
import org.geometerplus.fbreader.bookmodel.TOCTree;
import org.geometerplus.fbreader.fbreader.FBReaderApp;
final class NavigationPopup extends ZLApplication.PopupPanel {
final static String ID = "NavigationPopup";
public final class NavigationPopup extends ZLApplication.PopupPanel {
public final static String ID = "NavigationPopup";
private volatile NavigationWindow myWindow;
private volatile FBReader myActivity;
private volatile Activity myActivity;
private volatile RelativeLayout myRoot;
private ZLTextWordCursor myStartPosition;
private final FBReaderApp myFBReader;
private volatile boolean myIsInProgress;
NavigationPopup(FBReaderApp fbReader) {
public NavigationPopup(FBReaderApp fbReader) {
super(fbReader);
myFBReader = fbReader;
}
public void setPanelInfo(FBReader activity, RelativeLayout root) {
public void setPanelInfo(Activity activity, RelativeLayout root) {
myActivity = activity;
myRoot = root;
}
......@@ -95,7 +95,7 @@ final class NavigationPopup extends ZLApplication.PopupPanel {
}
}
private void createPanel(FBReader activity, RelativeLayout root) {
private void createPanel(Activity activity, RelativeLayout root) {
if (myWindow != null && activity == myWindow.getContext()) {
return;
}
......
......@@ -29,11 +29,11 @@ import org.geometerplus.zlibrary.text.view.ZLTextWordCursor;
import org.geometerplus.fbreader.fbreader.FBReaderApp;
abstract class PopupPanel extends ZLApplication.PopupPanel {
public abstract class PopupPanel extends ZLApplication.PopupPanel {
public ZLTextWordCursor StartPosition;
protected volatile SimplePopupWindow myWindow;
private volatile FBReader myActivity;
private volatile Activity myActivity;
private volatile RelativeLayout myRoot;
PopupPanel(FBReaderApp fbReader) {
......@@ -107,10 +107,10 @@ abstract class PopupPanel extends ZLApplication.PopupPanel {
}
}
public void setPanelInfo(FBReader activity, RelativeLayout root) {
public void setPanelInfo(Activity activity, RelativeLayout root) {
myActivity = activity;
myRoot = root;
}
public abstract void createControlPanel(FBReader activity, RelativeLayout root);
public abstract void createControlPanel(Activity activity, RelativeLayout root);
}
......@@ -19,6 +19,7 @@
package org.geometerplus.android.fbreader;
import android.app.Activity;
import android.view.View;
import android.widget.RelativeLayout;
......@@ -27,10 +28,10 @@ import org.geometerplus.fbreader.fbreader.ActionCode;
import org.geometerplus.fbreader.fbreader.FBReaderApp;
import org.geometerplus.zlibrary.ui.android.R;
class SelectionPopup extends PopupPanel implements View.OnClickListener {
final static String ID = "SelectionPopup";
public class SelectionPopup extends PopupPanel implements View.OnClickListener {
public final static String ID = "SelectionPopup";
SelectionPopup(FBReaderApp fbReader) {
public SelectionPopup(FBReaderApp fbReader) {
super(fbReader);
}
......@@ -40,7 +41,7 @@ class SelectionPopup extends PopupPanel implements View.OnClickListener {
}
@Override
public void createControlPanel(FBReader activity, RelativeLayout root) {
public void createControlPanel(Activity activity, RelativeLayout root) {
if (myWindow != null && activity == myWindow.getContext()) {
return;
}
......@@ -94,23 +95,17 @@ class SelectionPopup extends PopupPanel implements View.OnClickListener {
}
public void onClick(View view) {
switch (view.getId()) {
case R.id.selection_panel_copy:
Application.runAction(ActionCode.SELECTION_COPY_TO_CLIPBOARD);
break;
case R.id.selection_panel_share:
Application.runAction(ActionCode.SELECTION_SHARE);
break;
case R.id.selection_panel_translate:
Application.runAction(ActionCode.SELECTION_TRANSLATE);
break;
case R.id.selection_panel_bookmark:
Application.runAction(ActionCode.SELECTION_BOOKMARK);
break;
case R.id.selection_panel_close:
Application.runAction(ActionCode.SELECTION_CLEAR);
break;
}
int id = view.getId();
if (id == R.id.selection_panel_copy)
Application.runAction(ActionCode.SELECTION_COPY_TO_CLIPBOARD);
if (id == R.id.selection_panel_share)
Application.runAction(ActionCode.SELECTION_SHARE);
if (id == R.id.selection_panel_translate)
Application.runAction(ActionCode.SELECTION_TRANSLATE);
if (id == R.id.selection_panel_bookmark)
Application.runAction(ActionCode.SELECTION_BOOKMARK);
if (id == R.id.selection_panel_close)
Application.runAction(ActionCode.SELECTION_CLEAR);
Application.hideActivePopup();
}
}
......@@ -19,6 +19,7 @@
package org.geometerplus.android.fbreader;
import android.app.Activity;
import android.view.View;
import android.widget.RelativeLayout;
......@@ -28,10 +29,10 @@ import org.geometerplus.zlibrary.core.resources.ZLResource;
import org.geometerplus.fbreader.fbreader.ActionCode;
import org.geometerplus.fbreader.fbreader.FBReaderApp;
final class TextSearchPopup extends PopupPanel implements View.OnClickListener {
final static String ID = "TextSearchPopup";
public final class TextSearchPopup extends PopupPanel implements View.OnClickListener {
public final static String ID = "TextSearchPopup";
TextSearchPopup(FBReaderApp fbReader) {
public TextSearchPopup(FBReaderApp fbReader) {
super(fbReader);
}
......@@ -47,7 +48,7 @@ final class TextSearchPopup extends PopupPanel implements View.OnClickListener {
}
@Override
public synchronized void createControlPanel(FBReader activity, RelativeLayout root) {
public synchronized void createControlPanel(Activity activity, RelativeLayout root) {
if (myWindow != null && activity == myWindow.getContext()) {
return;
}
......@@ -82,18 +83,16 @@ final class TextSearchPopup extends PopupPanel implements View.OnClickListener {
}
public void onClick(View view) {
switch (view.getId()) {
case R.id.search_panel_previous:
Application.runAction(ActionCode.FIND_PREVIOUS);
break;
case R.id.search_panel_next:
Application.runAction(ActionCode.FIND_NEXT);
break;
case R.id.search_panel_close:
Application.runAction(ActionCode.CLEAR_FIND_RESULTS);
storePosition();
StartPosition = null;
Application.hideActivePopup();
int id = view.getId();
if (id == R.id.search_panel_previous)
Application.runAction(ActionCode.FIND_PREVIOUS);
if (id == R.id.search_panel_next)
Application.runAction(ActionCode.FIND_NEXT);
if (id == R.id.search_panel_close) {
Application.runAction(ActionCode.CLEAR_FIND_RESULTS);
storePosition();
StartPosition = null;
Application.hideActivePopup();
}
}
}
......@@ -19,9 +19,11 @@
package org.geometerplus.android.fbreader.dict;
import android.app.Activity;
import android.content.Intent;
import org.geometerplus.android.fbreader.FBReaderMainActivity;
import org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication;
final class ColorDict extends DictionaryUtil.PackageInfo {
private interface ColorDict3 {
......@@ -42,11 +44,11 @@ final class ColorDict extends DictionaryUtil.PackageInfo {
}
@Override
void open(String text, Runnable outliner, FBReaderMainActivity fbreader, DictionaryUtil.PopupFrameMetric frameMetrics) {
void open(String text, Runnable outliner, Activity fbreader, DictionaryUtil.PopupFrameMetric frameMetrics) {
final Intent intent = getActionIntent(text);
intent.putExtra(ColorDict3.HEIGHT, frameMetrics.Height);
intent.putExtra(ColorDict3.GRAVITY, frameMetrics.Gravity);
intent.putExtra(ColorDict3.FULLSCREEN, !fbreader.getZLibrary().ShowStatusBarOption.getValue());
intent.putExtra(ColorDict3.FULLSCREEN, !((ZLAndroidApplication)fbreader.getApplication()).library().ShowStatusBarOption.getValue());
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
InternalUtil.startDictionaryActivity(fbreader, intent, this);
......
......@@ -23,6 +23,7 @@ import com.github.johnpersano.supertoasts.SuperActivityToast;
import com.github.johnpersano.supertoasts.SuperToast;
import com.github.johnpersano.supertoasts.util.OnClickWrapper;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.os.Parcelable;
......@@ -40,7 +41,7 @@ final class Dictan extends DictionaryUtil.PackageInfo {
}
@Override
void open(String text, Runnable outliner, FBReaderMainActivity fbreader, DictionaryUtil.PopupFrameMetric frameMetrics) {
void open(String text, Runnable outliner, Activity fbreader, DictionaryUtil.PopupFrameMetric frameMetrics) {
final Intent intent = getActionIntent(text);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
......
......@@ -113,7 +113,7 @@ public abstract class DictionaryUtil {
// does nothing; implement in subclasses
}
abstract void open(String text, Runnable outliner, FBReaderMainActivity fbreader, PopupFrameMetric frameMetrics);
abstract void open(String text, Runnable outliner, Activity fbreader, PopupFrameMetric frameMetrics);
}
private static class PlainPackageInfo extends PackageInfo {
......@@ -122,7 +122,7 @@ public abstract class DictionaryUtil {
}
@Override
void open(String text, Runnable outliner, FBReaderMainActivity fbreader, PopupFrameMetric frameMetrics) {
void open(String text, Runnable outliner, Activity fbreader, PopupFrameMetric frameMetrics) {
final Intent intent = getActionIntent(text);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
......@@ -154,8 +154,6 @@ public abstract class DictionaryUtil {
final PackageInfo info;
if ("dictan".equals(id)) {
info = new Dictan(id, title);
} else if ("ABBYY Lingvo".equals(id)) {
info = new Lingvo(id, title);
} else if ("ColorDict".equals(id)) {
info = new ColorDict(id, title);
} else {
......@@ -225,7 +223,6 @@ public abstract class DictionaryUtil {
);
myActivity.runOnUiThread(new Runnable() {
public void run() {
OpenDictionary.collect(myActivity, ourInfos);
if (myPostAction != null) {
myPostAction.run();
}
......@@ -344,7 +341,7 @@ public abstract class DictionaryUtil {
}
}
public static void openTextInDictionary(final FBReaderMainActivity fbreader, String text, boolean singleWord, int selectionTop, int selectionBottom, final Runnable outliner) {
public static void openTextInDictionary(final Activity fbreader, String text, boolean singleWord, int selectionTop, int selectionBottom, final Runnable outliner) {
final String textToTranslate;
if (singleWord) {
int start = 0;
......
......@@ -45,7 +45,7 @@ abstract class InternalUtil {
activity.startActivity(intent);
}
static void startDictionaryActivity(FBReaderMainActivity fbreader, Intent intent, DictionaryUtil.PackageInfo info) {
static void startDictionaryActivity(Activity fbreader, Intent intent, DictionaryUtil.PackageInfo info) {
try {
fbreader.startActivity(intent);
fbreader.overridePendingTransition(0, 0);
......
/*
* Copyright (C) 2010-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.android.fbreader.dict;
import android.content.Intent;
import com.abbyy.mobile.lingvo.api.MinicardContract;
import org.geometerplus.zlibrary.core.language.Language;
import org.geometerplus.android.fbreader.FBReaderMainActivity;
final class Lingvo extends DictionaryUtil.PackageInfo {
Lingvo(String id, String title) {
super(id, title, true);
}
@Override
void open(String text, Runnable outliner, FBReaderMainActivity fbreader, DictionaryUtil.PopupFrameMetric frameMetrics) {
final Intent intent = getActionIntent(text);
intent.putExtra(MinicardContract.EXTRA_GRAVITY, frameMetrics.Gravity);
intent.putExtra(MinicardContract.EXTRA_HEIGHT, frameMetrics.Height);
intent.putExtra(MinicardContract.EXTRA_FORCE_LEMMATIZATION, true);
intent.putExtra(MinicardContract.EXTRA_TRANSLATE_VARIANTS, true);
intent.putExtra(MinicardContract.EXTRA_LIGHT_THEME, true);
final String targetLanguage = DictionaryUtil.TargetLanguageOption.getValue();
if (!Language.ANY_CODE.equals(targetLanguage)) {
intent.putExtra(MinicardContract.EXTRA_LANGUAGE_TO, targetLanguage);
}
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
InternalUtil.startDictionaryActivity(fbreader, intent, this);
}
}
/*
* Copyright (C) 2010-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.android.fbreader.dict;
import java.util.*;
import android.content.Context;
import com.paragon.dictionary.fbreader.OpenDictionaryFlyout;
import com.paragon.open.dictionary.api.Dictionary;
import com.paragon.open.dictionary.api.OpenDictionaryAPI;
import org.geometerplus.android.fbreader.FBReaderMainActivity;
final class OpenDictionary extends DictionaryUtil.PackageInfo {
static void collect(Context context, Map<DictionaryUtil.PackageInfo,Integer> dictMap) {
final SortedSet<Dictionary> dictionariesTreeSet =
new TreeSet<Dictionary>(new Comparator<Dictionary>() {
@Override
public int compare(Dictionary lhs, Dictionary rhs) {
return lhs.toString().compareTo(rhs.toString());
}
}
);
dictionariesTreeSet.addAll(
new OpenDictionaryAPI(context).getDictionaries()
);
for (Dictionary dict : dictionariesTreeSet) {
dictMap.put(new OpenDictionary(dict), DictionaryUtil.FLAG_SHOW_AS_DICTIONARY);
}
}
final OpenDictionaryFlyout Flyout;
OpenDictionary(Dictionary dictionary) {
super(dictionary.getUID(), dictionary.getName());
put("package", dictionary.getApplicationPackageName());
put("class", ".Start");
Flyout = new OpenDictionaryFlyout(dictionary);
}
@Override
void open(String text, Runnable outliner, FBReaderMainActivity fbreader, DictionaryUtil.PopupFrameMetric frameMetrics) {