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

selection UI (in progress)

This commit is contained in:
Nikolay Pultsin 2011-06-07 22:07:46 +01:00
parent e47c6fae69
commit b3d7fcbfc1
2 changed files with 11 additions and 4 deletions

View file

@ -193,9 +193,16 @@ public final class FBView extends ZLTextView {
final ZLTextRegion region = findRegion(x, y, MAX_SELECTION_DISTANCE, ZLTextRegion.AnyRegionFilter);
boolean doSelectRegion = false;
if (region instanceof ZLTextWordRegion) {
doSelectRegion =
myReader.WordTappingActionOption.getValue() !=
FBReaderApp.WordTappingAction.doNothing;
switch (myReader.WordTappingActionOption.getValue()) {
case startSelecting:
// myReader.doAction(ActionCode.SELECTION_HIDE_PANEL);
initSelection(x, y);
return true;
case selectSingleWord:
case openDictionary:
doSelectRegion = true;
break;
}
} else if (region instanceof ZLTextImageRegion) {
doSelectRegion =
myReader.ImageTappingActionOption.getValue() !=

View file

@ -1296,7 +1296,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
mySelectedRegion = region;
}
protected boolean startSelection(int x, int y) {
protected boolean initSelection(int x, int y) {
if (!mySelection.start(x, y)) {
return false;
}