I have 3 fragments.
- HomeFragment
- UserFragment
- ImagesFragment
i use this method for add fragments:
add(R.id.frameLayout, HomeFragment, "HomeFragment");
add(R.id.frameLayout, UserFragment, "UserFragment");
add(R.id.frameLayout, ImagesFragment, "ImagesFragment");
my problem:
i click and start this path:
- add
HomeFragment
- add
UserFragment
<-- click on follow button (follow btn UI changed Follow Done) - add
ImagesFragment
- add
UserFragment
<-- click on follow button (follow btn UI changed UnFollow Done) - press back button
back to step 3 -- show
ImagesFragment` - press back button
back to step 2 -- show
UserFragment` <-- oops!!! this is my problem . in step 4 i click on follow button and unfollow done. but not change UI in step 2 ? :(
how to update UI on latest change on same fragment?
have you instagram? please check it. open xyz page and start following. after click home btn (do not press back) next open xyz page again and set unfollow. now press back button back to xyz page .you show change follow btn ui