i am currently designing a ebook reader app as my project, i am having a problem in changing text of the textview from other activity.
Contents of my project,
Activity 1 contains two buttons and when button1 is clicked “Some Text” Should appear and when button2 is clicked “Some Other Text” sholud appear in a TextView1 which is in Activity2.
i mean the text should appear in TextView1 only. there is no other textview. okay.
please solve my problem with a simple code example.
Sorry for any mistakes in the question as it is my first attempt to really ask a question on internet.
Thank You
As far as i know you cannot access the UI component of2nd activity while being in first activity. so the best way is to pass the value through putExtra method of intents and then set it to textview in the oncreate of 2nd activity by getting it. here below is link which shows this method
http://mobileorchard.com/android-app-development-using-intents-to-pass-data-and-return-results-between-activities/