Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I want to pass the class and content of the class from one activity to another activity.

For example i have two activities activity A and activity B.

i created a class in activity B.

i want to pass this class from activity B back to activity A.


ANOTHER QUESTION IS THAT:

How i can put text loaded from the edittext to the two button.

For example there is a one edittext and two buttons.

i want to load the text from the edittext to the two button but difference text at the same time.
for example i want to set the text button1 to the one button and button2 to the another button and these text loaded from the edit text at the same time
Posted
Comments
Afzaal Ahmad Zeeshan 25-Jul-15 1:57am    
Why don't you directly call that class, such as SecondActivity.classB() and use it in your first activity?

Not a question.

1 solution

You cannot do it directly between intents; you need to use the Serializable class[^] or the Parcelable class[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900