ArminKH Well-Known Member Feb 14, 2016 #1 hi i've using some libs which has their own custom resources which we add them by #AdditionalRes but for some reason i need to make changes into the resources then i have 2 Res folder for 1 Library so i want use one of them by if statement some thing like this Code: Copy If AppIsRight2Left Then #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res1 Else if AppIsLeft2Right Then #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res2 End If is this possible? if not what is the solution? tnx all
hi i've using some libs which has their own custom resources which we add them by #AdditionalRes but for some reason i need to make changes into the resources then i have 2 Res folder for 1 Library so i want use one of them by if statement some thing like this Code: Copy If AppIsRight2Left Then #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res1 Else if AppIsLeft2Right Then #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res2 End If is this possible? if not what is the solution? tnx all
DonManfred Expert Licensed User Longtime User Feb 14, 2016 #2 ArminKH said: if not what is the solution? Click to expand... Use donditional compiling (create two build configurations. One for left, one for right. Code: Copy #If AppIsRight2Left #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res1 #Else #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res2 #End If Upvote 0
ArminKH said: if not what is the solution? Click to expand... Use donditional compiling (create two build configurations. One for left, one for right. Code: Copy #If AppIsRight2Left #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res1 #Else #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res2 #End If
ArminKH Well-Known Member Feb 14, 2016 #3 DonManfred said: Use donditional compiling (create two build configurations. One for left, one for right. Code: Copy #If AppIsRight2Left #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res1 #Else #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res2 #End If Click to expand... thank u but app language is changed by user in settings page and i want to change my resources based on language direction Upvote 0
DonManfred said: Use donditional compiling (create two build configurations. One for left, one for right. Code: Copy #If AppIsRight2Left #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res1 #Else #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res2 #End If Click to expand... thank u but app language is changed by user in settings page and i want to change my resources based on language direction
ArminKH Well-Known Member Feb 14, 2016 #4 AppIsRight2Left Is saved in a sqlite db and i want to choose resources based on this property when activity_create raised Upvote 0
AppIsRight2Left Is saved in a sqlite db and i want to choose resources based on this property when activity_create raised
Erel B4X founder Staff member Licensed User Longtime User Feb 14, 2016 #5 The resources are compiled into the APK. You cannot replace the resources at runtime. You can manually choose the resources based on their keys. Upvote 0
The resources are compiled into the APK. You cannot replace the resources at runtime. You can manually choose the resources based on their keys.
ArminKH Well-Known Member Feb 14, 2016 #6 Erel said: The resources are compiled into the APK. You cannot replace the resources at runtime. You can manually choose the resources based on their keys. Click to expand... yes i know but it's not my own library and i can't choose which resource should be used based on my settings i can just add resources for that lib by AdditionalRes Erel said: You cannot replace the resources at runtime Click to expand... my goal is some thing like Change Theme at run time is this possible to ignore some resources when activity_create raised? for example i have 2 resource like this Code: Copy #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res1 #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res2 is this possible to ignore res1 at run time? Upvote 0
Erel said: The resources are compiled into the APK. You cannot replace the resources at runtime. You can manually choose the resources based on their keys. Click to expand... yes i know but it's not my own library and i can't choose which resource should be used based on my settings i can just add resources for that lib by AdditionalRes Erel said: You cannot replace the resources at runtime Click to expand... my goal is some thing like Change Theme at run time is this possible to ignore some resources when activity_create raised? for example i have 2 resource like this Code: Copy #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res1 #AdditionalRes: ../CustomLibRes/MSMaterialDrawer-Res/md-app/res2 is this possible to ignore res1 at run time?
Erel B4X founder Staff member Licensed User Longtime User Feb 15, 2016 #7 No. You cannot change the resources at runtime. Upvote 0