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

Add pause button #14

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Add pause button #14

wants to merge 7 commits into from

Conversation

tfry-git
Copy link

My first venture into Android programming, please bear with me. I'm aware this PR will need more work. It is composed of two commits:

  1. Adjustments that I seemed to have to make in order to compile the project at all in a current installation of Android Studio. I don't really have much of an idea, what I'm doing, here, but works for me, and I tried being conservative about version requirements.
  1. The change I actually wanted to make:
    2a) Add a Pause/Resume button to the Run/Rest/Break screens. See issue Provide a "pause" button #8 .
    2b) Do not auto-pause on loss of focus. See issue Time stops when screen off or app not on focus #3 . I am aware this may be somewhat controversial, and should probably be controlled by a setting. Anyway, before putting more work into detail, I wanted to present what I have so far for some initial feedback on whether this may be of interest.

Raising the targetSdkVersion means the ActivityBar had to be ported. Done that.
In order to not make things extra convoluted in this new scenario, switching the
content within an activity does not look like a good idea, so I had to refactor a bit,
making this patch rather larger.
@tfry-git
Copy link
Author

Updates:

  • App was missing the "Action bar" after the forced update to Toolbar. Fixed. The styling isn't 100% what it was before, but pretty similar.
  • Added quick setting to reinstate the old "auto pause" behavior, if desired.

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.

1 participant