skiptools / skiptools/skip-ui

.statusBarHidden

Open
#211 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

compose enhancement good first issue help wanted
Dominant language
Swift
Stars
330
Forks
76
Avg merge
3h 6m
Merged PRs (30d)
1

Description

Skip UI doesn't support it. I hacked up my own version.

.onAppear {
    #if SKIP
    let activity = UIApplication.shared.androidActivity!
    let window = activity.window
    let view = activity.window.decorView
    let insetsController = androidx.core.view.WindowInsetsControllerCompat(window, view)
    if (statusBarHidden) {
      insetsController.hide(androidx.core.view.WindowInsetsCompat.Type.statusBars())
    } else {
      insetsController.show(androidx.core.view.WindowInsetsCompat.Type.statusBars())
    }
    #endif
}

Initially, I redisplayed it .onDisappear() but when navigating from one view with statusBarHidden to another view with statusBarHidden, the status bar would reappear, because the .onDisappear() of the previous view would fire after the .onAppear() of a subsequent view.

So I just slapped the .onAppear() on all the views that need to hide it, and any other views "near" them, making them all show the status bar.

In Skip UI, View.swift itself should take care of tracking this, IMO.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Skip UI's View.swift, which the issue identifies as the place to track statusBarHidden, and review how view appearance and disappearance are handled across navigation. Done means the modifier consistently hides or shows the Android status bar without requiring repeated onAppear workarounds when moving between views.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, swift
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.