T twocpv Member Licensed User Longtime User Feb 28, 2012 #1 Need help, I’ve got my app running but on my android mobile after typing in the edit text field and when I change the position of the phone from portrait to landscape the words just disappear. It becomes blank. Thanks in advance.
Need help, I’ve got my app running but on my android mobile after typing in the edit text field and when I change the position of the phone from portrait to landscape the words just disappear. It becomes blank. Thanks in advance.
JonPM Well-Known Member Licensed User Longtime User Feb 28, 2012 #2 Please read the beginners guide. This is discussed in there. Upvote 0
T twocpv Member Licensed User Longtime User Feb 28, 2012 #3 Please be more specific (e.g.: page number or what example), I am not sure where to look at. Thanks Upvote 0
JonPM Well-Known Member Licensed User Longtime User Feb 28, 2012 #4 Ch. 9 (Intro, and Activity_Pause sections), and 15.1.5 Though I recommend reading the whole thing Upvote 0
warwound Expert Licensed User Longtime User Feb 28, 2012 #5 Take a look at the StateManager code module. It can make easy work of saving and restoring View state on orientation change. Martin. Upvote 0
Take a look at the StateManager code module. It can make easy work of saving and restoring View state on orientation change. Martin.
T twocpv Member Licensed User Longtime User Mar 1, 2012 #6 Thanks for your responses. I couldn't compile the "StateManger" because I need library for "Reflector". Pls provide the link for library. Thanks I now know and understand the chapter 9 and 15 but I so new to this software and I need codes example. Please provide if you have one. Thanks Upvote 0
Thanks for your responses. I couldn't compile the "StateManger" because I need library for "Reflector". Pls provide the link for library. Thanks I now know and understand the chapter 9 and 15 but I so new to this software and I need codes example. Please provide if you have one. Thanks
NJDude Expert Licensed User Longtime User Mar 1, 2012 #7 This is the link to all the LIBRARIES. You can use the search box and look for code samples. Upvote 0
warwound Expert Licensed User Longtime User Mar 1, 2012 #8 twocpv said: Thanks for your responses. I couldn't compile the "StateManger" because I need library for "Reflector". Pls provide the link for library. Thanks I now know and understand the chapter 9 and 15 but I so new to this software and I need codes example. Please provide if you have one. Thanks Click to expand... The only library that you need to include with StateManager is the RandomAccessFile library. It's one of the libraries included with B4A so there is no need to download it. Martin. Upvote 0
twocpv said: Thanks for your responses. I couldn't compile the "StateManger" because I need library for "Reflector". Pls provide the link for library. Thanks I now know and understand the chapter 9 and 15 but I so new to this software and I need codes example. Please provide if you have one. Thanks Click to expand... The only library that you need to include with StateManager is the RandomAccessFile library. It's one of the libraries included with B4A so there is no need to download it. Martin.
T twocpv Member Licensed User Longtime User Mar 7, 2012 #9 Such a newbie.....I still got the this message: An error occurred. Error parsing program. Error description: Unknown type: reflector Are you missing a library reference: Occurred on line: 10 Dim Obj1 As Reflector I follow the link for library but can't see the library for this. And I don't know how to import or add the library. Please give me more detail and more instruction. Also I am trying to stop to text disappearing. Thanks for you help Upvote 0
Such a newbie.....I still got the this message: An error occurred. Error parsing program. Error description: Unknown type: reflector Are you missing a library reference: Occurred on line: 10 Dim Obj1 As Reflector I follow the link for library but can't see the library for this. And I don't know how to import or add the library. Please give me more detail and more instruction. Also I am trying to stop to text disappearing. Thanks for you help
warwound Expert Licensed User Longtime User Mar 7, 2012 #10 The Reflection library is part of B4A - there is no need to download it. Look at the attached screengrab. Select the Libs tab in the IDE and you should see Refelction listed there. Martin. Attachments reflection.jpg 16.6 KB · Views: 365 Upvote 0
The Reflection library is part of B4A - there is no need to download it. Look at the attached screengrab. Select the Libs tab in the IDE and you should see Refelction listed there. Martin.
A Andras Active Member Licensed User Longtime User Mar 7, 2012 #11 Another even simpler approach might be to make sure that the app only runs in Portrait mode - you can choose this option under Orientations Supported in the Project Menu. But you do need to be able to understand the life cycle of an app - an app runs in a far more restricting environment than a program on a PC or Mac, and the rules do need to be followed. John Upvote 0
Another even simpler approach might be to make sure that the app only runs in Portrait mode - you can choose this option under Orientations Supported in the Project Menu. But you do need to be able to understand the life cycle of an app - an app runs in a far more restricting environment than a program on a PC or Mac, and the rules do need to be followed. John
klaus Expert Licensed User Longtime User Mar 7, 2012 #12 I couldn't compile the "StateManger" because I need library for "Reflector". Click to expand... I don't know what code snippets you have put together because StateManger doensn't need the Reflector library so this problem is somewhere else in your program. To help us giving you the best advice you must post your project as a zip file then we can look at it, see what you have done, test it in the same conditions as you do and give you a concrete advice. Otherwise we must continue the 'riddle game'. The original problem of loosing the text in the EditText view is due to the life cycle of the activity. When you change the orientation the cureent Activity is paused and recreated. If you want to save the content of views you must save them in Activity_Pause and restore them in Activity_Resume. There are different solutions to save the data: - StateManger - global variables - in a file The second problem with the missing Reflector library is a new problem you added with some code, but has nothing to do with the StateManger module. Without your code we cannot help more. Best regards. Upvote 0
I couldn't compile the "StateManger" because I need library for "Reflector". Click to expand... I don't know what code snippets you have put together because StateManger doensn't need the Reflector library so this problem is somewhere else in your program. To help us giving you the best advice you must post your project as a zip file then we can look at it, see what you have done, test it in the same conditions as you do and give you a concrete advice. Otherwise we must continue the 'riddle game'. The original problem of loosing the text in the EditText view is due to the life cycle of the activity. When you change the orientation the cureent Activity is paused and recreated. If you want to save the content of views you must save them in Activity_Pause and restore them in Activity_Resume. There are different solutions to save the data: - StateManger - global variables - in a file The second problem with the missing Reflector library is a new problem you added with some code, but has nothing to do with the StateManger module. Without your code we cannot help more. Best regards.
Erel B4X founder Staff member Licensed User Longtime User Mar 7, 2012 #13 Actually the latest version of StateManager does require the Reflection library (required for the state of TabHosts). However it shouldn't cause any problem. Just add a reference to this library. Upvote 0
Actually the latest version of StateManager does require the Reflection library (required for the state of TabHosts). However it shouldn't cause any problem. Just add a reference to this library.
klaus Expert Licensed User Longtime User Mar 7, 2012 #14 Sorry, I missed updating the latest version. The Reflection library can be found here. To install it follow the instructions in chapter 21.3 in the Beginner's Guide. Best regards. Upvote 0
Sorry, I missed updating the latest version. The Reflection library can be found here. To install it follow the instructions in chapter 21.3 in the Beginner's Guide. Best regards.
T twocpv Member Licensed User Longtime User Mar 8, 2012 #15 My library list is different from your screen, I've attached my screen shot. Thanks Upvote 0
warwound Expert Licensed User Longtime User Mar 8, 2012 #16 twocpv said: My library list is different from your screen, I've attached my screen shot.View attachment 10741 Thanks Click to expand... Ooops! My mistake - the Reflection library is NOT part of the standard B4A built in libraries. The download link can be found here: http://www.b4x.com/forum/additional...pdates/6767-reflection-library.html#post39256 Are you having problems downloading it or problems getting it to appear in the B4A IDE? Martin. Upvote 0
twocpv said: My library list is different from your screen, I've attached my screen shot.View attachment 10741 Thanks Click to expand... Ooops! My mistake - the Reflection library is NOT part of the standard B4A built in libraries. The download link can be found here: http://www.b4x.com/forum/additional...pdates/6767-reflection-library.html#post39256 Are you having problems downloading it or problems getting it to appear in the B4A IDE? Martin.
T twocpv Member Licensed User Longtime User Mar 9, 2012 #17 Thanks all I got the example of StateManager works now. Will try to understand this. If there are any futher instruction or guide regarding orientation would be greatly appreciate. Thanks Upvote 0
Thanks all I got the example of StateManager works now. Will try to understand this. If there are any futher instruction or guide regarding orientation would be greatly appreciate. Thanks
warwound Expert Licensed User Longtime User Mar 9, 2012 #18 Though not directly relating to orientation, you might find this thread useful: http://www.b4x.com/forum/basic4andr...87-android-process-activities-life-cycle.html Martin. Upvote 0
Though not directly relating to orientation, you might find this thread useful: http://www.b4x.com/forum/basic4andr...87-android-process-activities-life-cycle.html Martin.