Data Sharing between Fragments and Activity in Android
问题 Ive asked a similar question before and didn\'t get an answer and seems many other ppl are searching for an answer. So I am posting this question to hopefully get a clear answer that everyone can benefit from. I have an activity with 2 fragments in it. I want fragment2 to set a boolean variable in Activity when a checkbox is checked so that fragment1 can know if the checkbox was checked. This is my Code: Activity: public class modestab extends Activity{ public static Context appContext;