Skip to main content

Posts

Showing posts with the label android-activity

Reuseable activties?

Hi i have a couple of question regaurding android and activites, i have tried looking online but can't seem to find what i am looking for, anyway; Say i have a menu activity with an option to create new "drawactivity", when user selects this an activity is presented with a toolbar on the top the lower enables the user to draw, then the user will save this activity and quit, when the user returns to the menu, the last activity the user was on is avaiable to load and the create new option is also avaible. So here are my questions; How is it possible to load an activty with a predefined layout and fuctions/code ready? and reuse it? Save this activity Load this activity If you have any resources or anything to point me in the right direction it would be greatly appreciated. Many thanks.

How to wait till the current acitivity is in progress

I am creating a test case which will check for the Android application. It launches the application. It enters the user and pass. I need to check whether it is logged in or not. For that I am trying to get the current activity. If it is logged in, it will show the next activity if not it will show the home activity itself. How to get the current activity or help me in doing this above mentioned option.