james_sgp Active Member Licensed User Longtime User Mar 25, 2020 #1 Hi, I`m using B4XLocalizator perfectly on Android, but when using the code from the demo in by B4i app; when the 'RootPanel.Remove..." & "RootPanel.Load..." they screw up the layout. I`m using Designer scripts which work ok without the two calls. It also shows panels that were previously hidden, very confused by this behavior. (I`m a B4i newbie, so apologies if its something stupid) James
Hi, I`m using B4XLocalizator perfectly on Android, but when using the code from the demo in by B4i app; when the 'RootPanel.Remove..." & "RootPanel.Load..." they screw up the layout. I`m using Designer scripts which work ok without the two calls. It also shows panels that were previously hidden, very confused by this behavior. (I`m a B4i newbie, so apologies if its something stupid) James
Erel B4X founder Staff member Licensed User Longtime User Mar 25, 2020 #2 Can you upload a small project that demonstrates the problem? Upvote 0
james_sgp Active Member Licensed User Longtime User Mar 25, 2020 #3 Erel, Here you go (its a very chopped down version of the app, but still has the problem), I`m running it in the Simulator; but as your demo works I`m guessing that isn`t a problem. James Attachments V-Analyzer.zip V-Analyzer.zip 181.2 KB · Views: 363 Upvote 0
Erel, Here you go (its a very chopped down version of the app, but still has the problem), I`m running it in the Simulator; but as your demo works I`m guessing that isn`t a problem. James
Erel B4X founder Staff member Licensed User Longtime User Mar 25, 2020 #4 1. This is not needed: Code: Copy Dim DataDB As String : DataDB= "data.db" Better to write it like this: Code: Copy Dim DataDB As String = "data.db" 2. I don't recommend using TableView especially if you are building cross platform solutions. Use xCustomListView. 3. All the views except of TableView should be declared as B4XView. 4. The layout is not built correctly. It will be much simpler to split it into several layout files. This will allow you to use anchors and remove the designer script code. 5. You either need to show the NavControl Toolbar or handle the safe area: https://www.b4x.com/android/forum/threads/iphone-x-safe-area.88095/#content I was able to change the language. What are the steps to see the problem? Upvote 0
1. This is not needed: Code: Copy Dim DataDB As String : DataDB= "data.db" Better to write it like this: Code: Copy Dim DataDB As String = "data.db" 2. I don't recommend using TableView especially if you are building cross platform solutions. Use xCustomListView. 3. All the views except of TableView should be declared as B4XView. 4. The layout is not built correctly. It will be much simpler to split it into several layout files. This will allow you to use anchors and remove the designer script code. 5. You either need to show the NavControl Toolbar or handle the safe area: https://www.b4x.com/android/forum/threads/iphone-x-safe-area.88095/#content I was able to change the language. What are the steps to see the problem?
james_sgp Active Member Licensed User Longtime User Mar 25, 2020 #5 Erel, Yes, language changing works, but then extra panels appear when you close the language panel (the About panel), and also the orange rectangle on the main page. This is what I was saying, I don`t understand why these appear... James Upvote 0
Erel, Yes, language changing works, but then extra panels appear when you close the language panel (the About panel), and also the orange rectangle on the main page. This is what I was saying, I don`t understand why these appear... James
james_sgp Active Member Licensed User Longtime User Mar 26, 2020 #6 Here are the steps I go through and see the problem Run app - compiles and run in Simulator Click MENU - burger at bottom right Click LANGUAGE Click any language option App refreshes with new language (correct...) BUT... When you click CLOSE on the Language panel, the About Panel is visible; close that...and the System_msg panel (orange outline) is also visible. Neither of these were turned to visible before opening the Language panel? James Upvote 0
Here are the steps I go through and see the problem Run app - compiles and run in Simulator Click MENU - burger at bottom right Click LANGUAGE Click any language option App refreshes with new language (correct...) BUT... When you click CLOSE on the Language panel, the About Panel is visible; close that...and the System_msg panel (orange outline) is also visible. Neither of these were turned to visible before opening the Language panel? James
Erel B4X founder Staff member Licensed User Longtime User Mar 26, 2020 #7 You are loading the layout again so it becomes visible: Code: Copy Private Sub ResetLayout Page1.RootPanel.RemoveAllViews Page1.RootPanel.LoadLayout("MainLayout") Log("reset layout") system_msg.Visible = False '<--- add this Correct way to show multiple layouts: https://www.b4x.com/android/forum/threads/multiple-pages-example.48170/#content Upvote 0
You are loading the layout again so it becomes visible: Code: Copy Private Sub ResetLayout Page1.RootPanel.RemoveAllViews Page1.RootPanel.LoadLayout("MainLayout") Log("reset layout") system_msg.Visible = False '<--- add this Correct way to show multiple layouts: https://www.b4x.com/android/forum/threads/multiple-pages-example.48170/#content
james_sgp Active Member Licensed User Longtime User Mar 26, 2020 #8 But i need to do that for the language change right? Ah ha...ok u made me think...so I should make the object invisible in the designer by default? Upvote 0
But i need to do that for the language change right? Ah ha...ok u made me think...so I should make the object invisible in the designer by default?
Erel B4X founder Staff member Licensed User Longtime User Mar 26, 2020 #9 james_sgp said: so I should make the object invisible in the designer by default? Click to expand... I told you about 8 more important things that you need to change If you want it to be invisible after the layout is loaded then you should uncheck the Visible property. Upvote 0
james_sgp said: so I should make the object invisible in the designer by default? Click to expand... I told you about 8 more important things that you need to change If you want it to be invisible after the layout is loaded then you should uncheck the Visible property.
james_sgp Active Member Licensed User Longtime User Mar 26, 2020 #10 Erel, Yes, I am aware of the other items you mentioned. I`m working on changing those, but having difficulties... I don`t understand how to load multiple layout files in B4i, it doesn`t seem as intuative as B4a. Upvote 0
Erel, Yes, I am aware of the other items you mentioned. I`m working on changing those, but having difficulties... I don`t understand how to load multiple layout files in B4i, it doesn`t seem as intuative as B4a.