Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show options menu & navigation drawer using WebView #6387

Merged
merged 8 commits into from
Jun 13, 2020

Conversation

krmanik
Copy link
Member

@krmanik krmanik commented Jun 6, 2020

Pull Request template

Purpose / Description

Show options menu using JavaScript in WebView when screen is in fullscreen.
This is continuation of #6307

Fixes

Fixes Link to the issues.

Approach

  1. Check if it is in full screen or not
  2. Call the function using JavaScript

How Has This Been Tested?

Tested on Emulator

  1. Add following to card templates in in <script> tag
<button onclick="ankiShowOptionsMenu()">Show Options Menu</button>
<button onclick="ankiShowNavDrawer()">Show Navigation Drawer</button>
  1. Turn on full screen, then click on above button to show menu

Learning (optional, can help others)

https://stackoverflow.com/questions/32643310/getactionbar-returns-null-in-actionbar
https://stackoverflow.com/questions/4642914/is-there-a-way-to-determine-if-android-app-is-running-full-screen

Checklist

Please, go through these checks before submitting the PR.

  • [ x ] You have not changed whitespace unnecessarily (it makes diffs hard to read)
  • [ x ] You have a descriptive commit message with a short title (first line, max 50 chars).
  • [ x ] Your code follows the style of the project (e.g. never omit braces in if statements)
  • [ x ] You have commented your code, particularly in hard-to-understand areas
  • [ x ] You have performed a self-review of your own code

	Updated AbstractFlashcardViewer.java

	Updated AbstractFlashcardViewer.java
@krmanik
Copy link
Member Author

krmanik commented Jun 9, 2020

This will be useful if AnkiDroid is in fullscreen, then one can be added to open those menu.

Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, then good to go!

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Jun 9, 2020
	Updated AbstractFlashcardViewer.java

	Updated AbstractFlashcardViewer.java

	Updated AbstractFlashcardViewer.java

	Updated AbstractFlashcardViewer.java

	Updated AbstractFlashcardViewer.java
@krmanik krmanik marked this pull request as draft June 9, 2020 17:11
@krmanik krmanik marked this pull request as ready for review June 9, 2020 17:15
@david-allison david-allison added Needs Review Needs Author Reply Waiting for a reply from the original author and removed Needs Author Reply Waiting for a reply from the original author Needs Review labels Jun 9, 2020
@david-allison david-allison added Needs Second Approval Has one approval, one more approval to merge and removed Needs Author Reply Waiting for a reply from the original author labels Jun 13, 2020
Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!

Copy link
Member

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty soon people will be able to have whatever user interface they want, at least with review :-). LGTM, thanks @infinyte7

@mikehardy mikehardy merged commit fc1b992 into ankidroid:master Jun 13, 2020
@mikehardy mikehardy removed the Needs Second Approval Has one approval, one more approval to merge label Jun 13, 2020
@mikehardy mikehardy added this to the 2.12 release milestone Jun 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants