I have a requirement of adding a panel with text box to few forms to show help.
This panel is not added in layout.
I want to add it through a common class to avoid writing in every form. Is there a way for this.
This is quite easy to do. I usually add a semi-transparent panel over the activity - this dims the screen and stops the User activating any views. Then another panel on top of that carries the help information.
I am a bit busy at the moment, but if you are interested I can post a demo example later.
After getting value in class (from the job) I am loading a predefined layout in a temporary panel.
When i am trying to add this temp panel to activity it gives error.
Here is the demo. This one gives short help tips with "Got it" (don't show again) and "Later" (don't bother me now) options. I have added a "Reset" button to set everything back to the start - this is useful for the demo.
If you want to give longer help messages then you will have to adapt the demo to provide a larger area for text. However the principle of overlaying a panel to screen the underlying activity will be the same. Note that you need to give the panel some elevation to get above buttons. Let me know if anything is unclear.
I checked the demo and found a minor difference instead of Me it should be Activity when calling class function . I changed it and it worked.
Lot of Thanks Brian.