Skip to content

fix: preserve selected tabs on recreation - #9

Closed
letharion wants to merge 4 commits into
gerhardol:feature/deprecated-tabhostfrom
letharion:fix/tab-restore
Closed

letharion wants to merge 4 commits into
gerhardol:feature/deprecated-tabhostfrom
letharion:fix/tab-restore

Conversation

@letharion

Copy link
Copy Markdown

Save and restore tab positions on the start and activity details screens.

The old TabHost kept track of which was the active tab, in a way that TabLayout does not.
If you pick "advanced", change the screen re-renders, for example due to switching to dark mode, then you end up back at the first tab again.

This adds tracking of the users tracked.

Notifications were left stuck after the completion of a workout.
Cancel the notification id explicitly removes it.
@gerhardol

Copy link
Copy Markdown
Owner

For me the tab switches also for the Play version. But ifyou think it should be changed, OK.

@letharion

Copy link
Copy Markdown
Author

Interesting. I started up the play version, 2.11.0.1, and I can't reproduce the behavior there. The play version stays on the advanced tab when I flip dark mode on/off.

@gerhardol
gerhardol force-pushed the feature/deprecated-tabhost branch from 50bcfb7 to 720edde Compare October 11, 2026 19:12
gerhardol and others added 2 commits October 11, 2026 21:19
)

The detail tabs kept the old Holo tab indicator as a custom view inside
the new TabLayout. TabLayout pads each tab, so the Holo underlines no
longer met and the line under the tabs broke into segments, with
TabLayout's own indicator drawn on top under the selected tab. Use plain
text tabs as the start screen does, so both screens look the same.

The map tab is now found through Tab.view rather than the custom view's
parent.

The activity details screen was the last user of
WidgetUtil.createHoloTabIndicator. Remove it and its Holo tab drawables.
@gerhardol

Copy link
Copy Markdown
Owner

please reopen on jonasoreland repo, and we merge it there (I can reopen but not move).

Save and restore tab positions on the start and activity details screens.
@letharion

Copy link
Copy Markdown
Author

@gerhardol Moved to jonasoreland#1399
I'll start running my local app based on jonasoreland#1394 and will test that over the coming days.

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.

2 participants