mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 02:39:23 +02:00
long tap processing has been moved from Activity to View
This commit is contained in:
parent
ff1845c65b
commit
82134850ca
4 changed files with 30 additions and 14 deletions
|
@ -170,16 +170,6 @@ public final class FBReader extends ZLAndroidActivity {
|
|||
panel.setExtension(layout);
|
||||
myNavigatePanel.setControlPanel(panel, root, true);
|
||||
}
|
||||
|
||||
findViewById(R.id.main_view).setOnLongClickListener(new View.OnLongClickListener() {
|
||||
public boolean onLongClick(View v) {
|
||||
if (!myNavigatePanel.getVisibility()) {
|
||||
navigate();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -246,11 +236,15 @@ public final class FBReader extends ZLAndroidActivity {
|
|||
}
|
||||
}
|
||||
|
||||
public void navigate() {
|
||||
public boolean navigate() {
|
||||
if (myNavigatePanel.getVisibility()) {
|
||||
return false;
|
||||
}
|
||||
final ZLTextView textView = (ZLTextView)ZLApplication.Instance().getCurrentView();
|
||||
myNavigatePanel.NavigateDragging = false;
|
||||
myNavigatePanel.StartPosition = new ZLTextFixedPosition(textView.getStartCursor());
|
||||
myNavigatePanel.show(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
private final void createNavigation(View layout) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue