JesseW Active Member Licensed User Longtime User Apr 19, 2012 #1 Erel, 1) what happens when an Activity.Initialize method is executed? it doesn't clear the views or the menu options or anything that I can see. 2) how can I clear the menu options?
Erel, 1) what happens when an Activity.Initialize method is executed? it doesn't clear the views or the menu options or anything that I can see. 2) how can I clear the menu options?
Erel B4X founder Staff member Licensed User Longtime User Apr 20, 2012 #2 You shouldn't call Activity.Initialize. The Activity is always initialized for you. This method is only available because Activity is a subtype of View. You can easily remove all views with a code such as: Code: Copy For i = 0 To Activity.NumberOfViews - 1 Activity.RemoveViewAt(0) '0 NOT i Next It is not possible to clear the menu options. You will need to implement a custom menu instead. Upvote 0
You shouldn't call Activity.Initialize. The Activity is always initialized for you. This method is only available because Activity is a subtype of View. You can easily remove all views with a code such as: Code: Copy For i = 0 To Activity.NumberOfViews - 1 Activity.RemoveViewAt(0) '0 NOT i Next It is not possible to clear the menu options. You will need to implement a custom menu instead.
B B4A Enthusiast Member Licensed User Longtime User Nov 3, 2013 #3 I have a confusing scenario with my views. When I load the layout containing two editTexts(txtUserName and txtPassword) and two buttons(Login and Quit) from a class (that runs a splashscreen on the main activity). The First editText (txtUserName) gets the focus as intended. However, the two buttons will not respond to click event until the screen is rotated. This is annoying to the user. I want the buttons to be able to sense the click event immediately the layout is loaded from the class module. I thought calling Activity.Initialize from the class module that loaded the layout would help but it didn't. Any suggestions please? Upvote 0
I have a confusing scenario with my views. When I load the layout containing two editTexts(txtUserName and txtPassword) and two buttons(Login and Quit) from a class (that runs a splashscreen on the main activity). The First editText (txtUserName) gets the focus as intended. However, the two buttons will not respond to click event until the screen is rotated. This is annoying to the user. I want the buttons to be able to sense the click event immediately the layout is loaded from the class module. I thought calling Activity.Initialize from the class module that loaded the layout would help but it didn't. Any suggestions please?
Erel B4X founder Staff member Licensed User Longtime User Nov 3, 2013 #4 This is an old thread. Please start a new thread for this question. Upvote 0
C ComposerB4A Member Licensed User Longtime User Nov 5, 2013 #5 Is possible make one "sub" for assing a predeterminated value (ex.: to controls, variables, ...), and this "sub" is called in "initialize" or other procedures Upvote 0
Is possible make one "sub" for assing a predeterminated value (ex.: to controls, variables, ...), and this "sub" is called in "initialize" or other procedures
Erel B4X founder Staff member Licensed User Longtime User Nov 6, 2013 #6 Please start a new thread for this question. Upvote 0