Skip to content

Commit 82c966b

Browse files
authored
Merge pull request #6 from endlessm/fix-icon-bg-arg
Add icon-bg and icon-fg to fix_args
2 parents b672ec4 + 7328a69 commit 82c966b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pythonforandroid/bootstraps/common/build/build.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,10 @@ def make_package(args):
349349
if args.icon_fg and args.icon_bg:
350350
shutil.copy(args.icon_fg, join(res_dir, 'mipmap/icon_foreground.png'))
351351
shutil.copy(args.icon_bg, join(res_dir, 'mipmap/icon_background.png'))
352-
with open(join(res_dir, 'mipmap-anydpi-v26/icon.xml'), "w") as fd:
352+
mipmap_anydpi = join(res_dir, 'mipmap-anydpi-v26')
353+
if not exists(mipmap_anydpi):
354+
os.mkdir(mipmap_anydpi)
355+
with open(join(mipmap_anydpi, 'icon.xml'), "w") as fd:
353356
fd.write("""<?xml version="1.0" encoding="utf-8"?>
354357
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
355358
<background android:drawable="@mipmap/icon_background"/>

pythonforandroid/toolchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ def _fix_args(args):
988988

989989
fix_args = ('--dir', '--private', '--add-jar', '--add-source',
990990
'--whitelist', '--blacklist', '--presplash', '--icon',
991-
'--fileprovider-paths')
991+
'--icon-bg', '--icon-fg', '--fileprovider-paths')
992992
unknown_args = args.unknown_args
993993

994994
for asset in args.assets:

0 commit comments

Comments
 (0)