mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-06 12:00:17 +02:00
selection UI (in progress)
This commit is contained in:
parent
e47c6fae69
commit
b3d7fcbfc1
2 changed files with 11 additions and 4 deletions
|
@ -193,9 +193,16 @@ public final class FBView extends ZLTextView {
|
||||||
final ZLTextRegion region = findRegion(x, y, MAX_SELECTION_DISTANCE, ZLTextRegion.AnyRegionFilter);
|
final ZLTextRegion region = findRegion(x, y, MAX_SELECTION_DISTANCE, ZLTextRegion.AnyRegionFilter);
|
||||||
boolean doSelectRegion = false;
|
boolean doSelectRegion = false;
|
||||||
if (region instanceof ZLTextWordRegion) {
|
if (region instanceof ZLTextWordRegion) {
|
||||||
doSelectRegion =
|
switch (myReader.WordTappingActionOption.getValue()) {
|
||||||
myReader.WordTappingActionOption.getValue() !=
|
case startSelecting:
|
||||||
FBReaderApp.WordTappingAction.doNothing;
|
// myReader.doAction(ActionCode.SELECTION_HIDE_PANEL);
|
||||||
|
initSelection(x, y);
|
||||||
|
return true;
|
||||||
|
case selectSingleWord:
|
||||||
|
case openDictionary:
|
||||||
|
doSelectRegion = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
} else if (region instanceof ZLTextImageRegion) {
|
} else if (region instanceof ZLTextImageRegion) {
|
||||||
doSelectRegion =
|
doSelectRegion =
|
||||||
myReader.ImageTappingActionOption.getValue() !=
|
myReader.ImageTappingActionOption.getValue() !=
|
||||||
|
|
|
@ -1296,7 +1296,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
|
||||||
mySelectedRegion = region;
|
mySelectedRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean startSelection(int x, int y) {
|
protected boolean initSelection(int x, int y) {
|
||||||
if (!mySelection.start(x, y)) {
|
if (!mySelection.start(x, y)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue