Akhmad Al Qindi Irsyam 2 năm trước cách đây
mục cha
commit
3372a7b2d2
1 tập tin đã thay đổi với 8 bổ sung8 xóa
  1. 8 8
      src/mainPalio4.py

+ 8 - 8
src/mainPalio4.py

@@ -56,18 +56,18 @@ def create_folder(package_id):
 
 
 def change_acc(c_code_path, acc, enable_sms):
-    main_activity = os.path.join(c_code_path, "MainActivity.java")
+    main_activity = os.path.join(c_code_path, "MAB.java")
     with open(main_activity, "r") as f:
         file_source = f.read()
     replaced = file_source.replace("***REPLACE***WITH***YOUR***QMERA***ACCOUNT***", acc)
     if enable_sms == 1:
-        replaced = replaced.replace("setIsEnabledSMS(false)", "setIsEnabledSMS(true)")
+        replaced = replaced.replace("isEnabledSMS = false", "isEnabledSMS = true")
     with open(main_activity, "w") as f:
         f.write(replaced)
 
 
 def change_url(c_code_path, url):
-    main_activity = os.path.join(c_code_path, "MainActivity.java")
+    main_activity = os.path.join(c_code_path, "MAB.java")
     with open(main_activity, "r") as f:
         file_source = f.read()
     replaced = file_source.replace("https://www.google.com", url)
@@ -247,8 +247,8 @@ def change_logo(path_dest, logo, logo_float=None):
 
 
 def change_tab(path_dest, tabs, tab_icon, package, tab3_mode, tab_amount):
-    default_tab_icon = ["tab1.png", "tab2.png", "tab3.png", "tab4.png"]
-    for i in range(4):
+    default_tab_icon = ["tab{}.png".format(x) for x in range(1, tab_amount+1)]
+    for i in range(tab_amount):
         if not tab_icon[i]:
             continue
         img_path = "app/src/main/res/drawable"
@@ -274,7 +274,7 @@ def change_tab(path_dest, tabs, tab_icon, package, tab3_mode, tab_amount):
     replaced = file_source.replace("1,2,3,4", ",".join(tabs))
     with open(sobj_code_path, "w") as f:
         f.write(replaced)
-    main_code_path = os.path.join(path_dest, code_path, path_package_id, "MainActivity.java")
+    main_code_path = os.path.join(path_dest, code_path, path_package_id, "MAB.java")
     with open(main_code_path, "r") as f:
         file_source = f.read()
     replaced = file_source.replace('tab3 = "0"', 'tab3 = "{}"'.format(tab3_mode))
@@ -435,13 +435,13 @@ def build_apk():
         # tabs = ["1", "2", "3", "4"]
         tabs = []
         tab3_mode = "0"
-        tab_icon = [None, None, None, None]
+        tab_amount = 6
+        tab_icon = [None, None, None, None, None, None]
         fb_icon = [None, None, None, None, None]
         background = None
         version_code = "1"
         version_name = "1.0.0"
         font = 0
-        tab_amount = 4
         enable_sms = 0
         key = {"alias": "nexilislite", "store_password": "allyourbase", "key_password": "arebelongto", "common_name": "all", "organization_unit": "your",
                "organization_name": "base", "locality_name": "are", "state_name": "belong", "country": "to"}