communication between fragment and other activity

后端 未结 3 1137
小蘑菇
小蘑菇 2021-01-29 10:58
public class FragActivity1 extends Fragment implements View.OnClickListener {

    View view;
    ImageButton name_change__btn, status_change_btn, profile_change_btn;
           


        
3条回答
  •  耶瑟儿~
    2021-01-29 11:15

    You should use LocalBroadcastManager To commuicate between two Activities The concept is simple and can be implemented easily check below link

    https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwiT89LA4rbOAhXLso8KHexGAkwQFggdMAA&url=https%3A%2F%2Fdeveloper.android.com%2Freference%2Fandroid%2Fsupport%2Fv4%2Fcontent%2FLocalBroadcastManager.html&usg=AFQjCNGameWXe05OE9ufTkz6rzSydOw91g

提交回复
热议问题