• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kivy / kivy / 27977218873
60%

Build:
DEFAULT BRANCH: master
Ran 22 Jun 2026 07:17PM UTC
Jobs 2
Files 344
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Jun 2026 07:07PM UTC coverage: 59.552% (-0.02%) from 59.568%
27977218873

push

github

web-flow
feat: introduce kivy.mobile — platform-neutral bridge for mobile window/display geometry (#9331)

* feat: introduce kivy.mobile namespace for mobile window/display geometry

Add kivy/mobile/ package as a platform-neutral bridge for runtime
information Kivy needs on mobile platforms (DPI, scale, safe area,
keyboard height).  Platform dispatch lives in kivy/mobile/_platform/:

  ios.py     — full UIKit implementation via ctypes / ObjC runtime:
               get_dpi (lookup table), get_scale (nativeScale),
               get_safe_area (safeAreaInsets), live keyboard height via
               NSNotificationCenter UIKeyboardWillChangeFrameNotification.
  android.py — delegates to jnius / android platform module; exposes
               get_display_cutout() and get_system_bar_insets() (Tier-2).
  generic.py — desktop fallback; get_dpi() reads from the Window provider,
               all mobile-only values return safe zeros.

Wire kivy.mobile into existing callers:
  * kivy/metrics.py: replace bare `import ios` / `import android` in
    get_dpi() and get_density() with `from kivy.mobile import ...`.
  * kivy/core/window/__init__.py: replace _get_ios_kheight() bare import,
    add Window.safe_area DictProperty refreshed on startup and on_rotate,
    add _refresh_safe_area() helper.

Add kivy/tests/test_mobile.py with desktop-runnable unit tests covering
the generic fallback and the full public API contract.

* refactor: remove get_kheight() from kivy.mobile public API

get_kheight() was an internal Kivy convention (used by _get_ios_kheight)
that was never documented as public API. The canonical name is
get_keyboard_height(). Removing the alias keeps the kivy.mobile surface
clean from the start.

get_kheight() is retained in the kivy-ios ios.py template for backward
compatibility with apps that import it directly from the platform shim.

* docs: clarify Android implementation uses jnius (always present in p4a)

* refactor: make android.py an explicit placehold... (continued)

3250 of 6484 branches covered (50.12%)

128 of 252 new or added lines in 6 files covered. (50.79%)

28826 of 48405 relevant lines covered (59.55%)

1.18 hits per line

Uncovered Changes

Lines Coverage ∆ File
107
25.17
kivy/mobile/_platform/ios.py
9
68.48
-0.15% kivy/core/window/__init__.py
4
35.21
1.22% kivy/metrics.py
2
71.43
kivy/mobile/__init__.py
1
94.74
kivy/mobile/_platform/android.py
1
98.33
kivy/tests/test_mobile.py
Jobs
ID Job ID Ran Files Coverage
1 27977218873.1 22 Jun 2026 07:17PM UTC 344
59.49
GitHub Action Run
2 27977218873.2 22 Jun 2026 07:18PM UTC 344
58.02
GitHub Action Run
Source Files on build 27977218873
  • Tree
  • List 344
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27977218873
  • 8279c159 on github
  • Prev Build on master (#27672803894)
  • Next Build on master (#27977373136)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc