0

I have implemented my own header in place of the typical action bar, but would like to keep the original contextual action bar available when text is selected within the WebView.

Unfortunately, what happens is that the contextual action bar is inserted above my header, pushing the header down. I would rather it cover my header.

I think the best way to handle this is to hide my header when the CAB is opened, and restore the header afterwords. This would provide behavior more consistent with the stock Action Bar found on many apps.

I have found what might be a way to detect when the CAB is opened, but is this the right way? And more importantly, how can I detect when the CAB is closed to restore my header?

Community
  • 1
  • 1
700 Software
  • 85,281
  • 83
  • 234
  • 341
  • Have you tried the above method in link? – Nadeem Iqbal Oct 21 '14 at 16:52
  • If it's suitable you could try to use standard ActionBar with a custom view (use setCustomView()). This will allow to benefit from standard CAB. – sergej shafarenka Oct 21 '14 at 18:01
  • @NadeemIqbal, No. I am awaiting an answer to the second part of the question because if I don't get one, then linked answer would be useless. – 700 Software Oct 21 '14 at 18:06
  • @beworker, Thank you for the suggestion. I believe this will be very helpful in the future. Unfortunately, in this particular case, the action bar is within the WebView, allowing the user to scroll down hiding the action bar when in tight corners (such as when viewing in landscape with an on-screen keyboard open), and locking to the top again when the keyboard is closed or orientation goes back to portrait. – 700 Software Oct 21 '14 at 18:08

0 Answers0