3
I am a beginner in Android and I have the following problem. I have a screen (Activity) where is informed the condition of payment and the type of payment.
Clicking on the payment condition field opens another screen with a list of payment terms
When I click on an item in the list I select an item from that list back to the previous screen where it loads the values of the selected item as can be seen in the first image. But when I click on the payment type field performs the same process opens a new screen with the list of payment types and when clicking on an item in the list goes back to the previous screen with the payment type information. Only when returning to the screen loads the payment type information, but clears the information previously loaded from the payment method.
- How should I treat so that the previously filled information is not lost?
Please make a Copy of these images, leave only the relevant part.
– Genos
Place the code you are using to return to the previous screen and to pass this data between the screens.
– Pablo Almeida
Gives a read on maintaining screen states. https://developer.android.com/training/basics/activity-lifecycle/recreating.html?hl=pt-br
– user78020