Skip to content

Commit

Permalink
Attempt to Shows/hides the next/prev buttons. Doesn't work... if some…
Browse files Browse the repository at this point in the history
…one with Android knowledge has time, feel free.
  • Loading branch information
Thiébaut Champenier committed Jun 29, 2024
1 parent ab56f7f commit e4ace55
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,11 @@ private void showCurrentSearchResult() {
if (currentSearchResultIndex >= 0 && currentSearchResultIndex < searchResultNodes.size()) {
downTo(getContext(), searchResultNodes.get(currentSearchResultIndex), false);
}
// Shows/hides the next/prev buttons
// FIXME findViewById doesn't work, looks like you need to call invalidateOptionsMenu()
// and then hide/show the items in onCreateOptionsMenu(Menu) using menu.findItem().setVisible()
// findViewById(R.id.search_prev).setVisibility(currentSearchResultIndex > 0 ? VISIBLE : GONE);
// findViewById(R.id.search_next).setVisibility(currentSearchResultIndex < searchResultNodes.size() - 1 ? VISIBLE : GONE);
}

/** Selects the next search result node. */
Expand Down

0 comments on commit e4ace55

Please sign in to comment.