Skip to content

Commit fc61632

Browse files
committed
More tools for the developer + minor changes
1 parent 5d27bc1 commit fc61632

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

pythonforandroid/recipes/android/src/android/display_cutout.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def _core_cutout():
1616

1717

1818
def get_cutout_pos():
19-
""" Get position of the display-cutout.
20-
Returns integer for each positions (xy)
19+
"""Get position of the display-cutout.
20+
Returns integer for each positions (xy)
2121
"""
2222
try:
2323
cutout = _core_cutout()
@@ -28,8 +28,8 @@ def get_cutout_pos():
2828

2929

3030
def get_cutout_size():
31-
""" Get the size (xy) of the front camera.
32-
Returns size with float values
31+
"""Get the size (xy) of the front camera.
32+
Returns size with float values
3333
"""
3434
try:
3535
cutout = _core_cutout()
@@ -40,8 +40,8 @@ def get_cutout_size():
4040

4141

4242
def get_height_of_bar(bar_target=None):
43-
""" Get the height of either statusbar or navigationbar
44-
bar_target = status or navigation and defaults to status
43+
"""Get the height of either statusbar or navigationbar
44+
bar_target = status or navigation and defaults to status
4545
"""
4646
bar_target = bar_target or 'status'
4747

@@ -62,24 +62,24 @@ def get_height_of_bar(bar_target=None):
6262

6363

6464
def get_width_of_bar(bar_target=None):
65-
" Get the width of the bar "
65+
"""Get the width of the bar"""
6666
return Window.width
6767

6868

6969
def get_size_of_bar(bar_target=None):
70-
""" Get the size of either statusbar or navigationbar
71-
bar_target = status or navigation and defaults to status
70+
"""Get the size of either statusbar or navigationbar
71+
bar_target = status or navigation and defaults to status
7272
"""
7373
return get_width_of_bar(), get_height_of_bar(bar_target)
7474

7575

7676
def get_heights_of_both_bars():
77-
" Return heights of both bars "
77+
"""Return heights of both bars"""
7878
return get_height_of_bar('status'), get_height_of_bar('navigation')
7979

8080

8181
def get_cutout_mode():
82-
" Return mode for cutout supported applications "
82+
"""Return mode for cutout supported applications"""
8383
LayoutParams = autoclass('android.view.WindowManager$LayoutParams')
8484
window = mActivity.getWindow()
8585
layout_params = window.getAttributes()

0 commit comments

Comments
 (0)