1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 10:49:24 +02:00

better integration with ColorDict 3.0.1

This commit is contained in:
Nikolay Pultsin 2011-01-27 18:53:56 +00:00
parent 3cb4674893
commit 0c3d0e7401

View file

@ -28,6 +28,8 @@ import android.net.Uri;
import org.geometerplus.zlibrary.core.options.ZLStringOption; import org.geometerplus.zlibrary.core.options.ZLStringOption;
import org.geometerplus.zlibrary.core.resources.ZLResource; import org.geometerplus.zlibrary.core.resources.ZLResource;
import org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication;
import org.geometerplus.android.util.UIUtil; import org.geometerplus.android.util.UIUtil;
import org.geometerplus.android.util.PackageUtil; import org.geometerplus.android.util.PackageUtil;
@ -47,6 +49,7 @@ public abstract class DictionaryUtil {
String MARGIN_TOP = "EXTRA_MARGIN_TOP"; String MARGIN_TOP = "EXTRA_MARGIN_TOP";
String MARGIN_BOTTOM = "EXTRA_MARGIN_BOTTOM"; String MARGIN_BOTTOM = "EXTRA_MARGIN_BOTTOM";
String MARGIN_RIGHT = "EXTRA_MARGIN_RIGHT"; String MARGIN_RIGHT = "EXTRA_MARGIN_RIGHT";
String FULLSCREEN = "EXTRA_FULLSCREEN";
} }
private static Map<PackageInfo,Boolean> infos() { private static Map<PackageInfo,Boolean> infos() {
@ -163,6 +166,8 @@ public abstract class DictionaryUtil {
if (dictionaryInfo.IntentKey != null) { if (dictionaryInfo.IntentKey != null) {
intent.putExtra(ColorDict3.HEIGHT, 300); intent.putExtra(ColorDict3.HEIGHT, 300);
intent.putExtra(ColorDict3.GRAVITY, android.view.Gravity.BOTTOM); intent.putExtra(ColorDict3.GRAVITY, android.view.Gravity.BOTTOM);
final ZLAndroidApplication application = ZLAndroidApplication.Instance();
intent.putExtra(ColorDict3.FULLSCREEN, !application.ShowStatusBarOption.getValue());
return intent.putExtra(dictionaryInfo.IntentKey, text); return intent.putExtra(dictionaryInfo.IntentKey, text);
} else { } else {
return intent.setData(Uri.parse(text)); return intent.setData(Uri.parse(text));