diff --git a/gen-custom-android-build.py b/gen-custom-android-build.py index 48d73b653..7c889c8d5 100755 --- a/gen-custom-android-build.py +++ b/gen-custom-android-build.py @@ -338,8 +338,8 @@ def step_update_xml_nodes(jsdata, **options): 'preferences.xml') soup = soup = BeautifulSoup(open(preferences_xml, 'r'), 'xml', from_encoding='utf-8') - item = soup.find('org.kiwix.kiwixmobile.settings.CustomSwitchPreference') - item.name = '{}.settings.CustomSwitchPreference'.format(jsdata.get('package')) + for item in soup.findAll('org.kiwix.kiwixmobile.settings.CustomSwitchPreference'): + item.name = '{}.settings.CustomSwitchPreference'.format(jsdata.get('package')) flushxml(soup, 'PreferenceScreen', preferences_xml, head=False) # rename AnimatedProgressBar node in res/layout/toolbar.xml