R
R
Raiklai2021-03-14 12:05:39
android studio
Raiklai, 2021-03-14 12:05:39

How to set the image of one button in one activity, as a result of pressing another button in another activity?

Hello! I'm doing my project, and because began recently, the first problems appeared. From the question it is clear that I want to achieve the following from the program:
1) When you press button_1 from the First Activity, we go to the Second.
2) In the Second activity, we must click on the button_2, which has its own image, and go back to the First Activity.
3) Image from button_2 goes to button_1.

I did the first and second points, but I don’t know how to do what is written in the third point, please help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Zakharov, 2021-03-14
@Raiklai

You can use startActivityForResult.
We call the second activity from the first one and pass the result to the first one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question