Fragments can update the title of the activity.

This commit is contained in:
Pierre 2017-12-25 17:56:50 +01:00
parent 624c30c5cc
commit f3a49693a2
4 changed files with 26 additions and 0 deletions

View File

@ -122,6 +122,13 @@ public class ConversationsListFragment extends Fragment implements AdapterView.O
} }
} }
@Override
public void onResume() {
super.onResume();
getActivity().setTitle(R.string.fragment_conversationslist_title);
}
/** /**
* Process the conversation list * Process the conversation list
* *

View File

@ -103,6 +103,14 @@ public class FriendsListFragment extends Fragment {
} }
@Override
public void onResume() {
super.onResume();
//Update the title of the application
getActivity().setTitle(R.string.fragment_friendslist_title);
}
@Override @Override
public void onStart() { public void onStart() {
super.onStart(); super.onStart();

View File

@ -83,4 +83,12 @@ public class UserInfosFragment extends Fragment {
}); });
} }
@Override
public void onResume() {
super.onResume();
//Update the title
getActivity().setTitle(R.string.fragment_userinfos_title);
}
} }

View File

@ -62,4 +62,7 @@
<string name="conversation_message_remove_image_popup_message">Do you want to remove selected image ?</string> <string name="conversation_message_remove_image_popup_message">Do you want to remove selected image ?</string>
<string name="conversation_message_remove_image_popup_confirm">Yes</string> <string name="conversation_message_remove_image_popup_confirm">Yes</string>
<string name="conversation_message_remove_image_popup_cancel">No</string> <string name="conversation_message_remove_image_popup_cancel">No</string>
<string name="fragment_friendslist_title">Friends</string>
<string name="fragment_conversationslist_title">Conversations</string>
<string name="fragment_userinfos_title">About me</string>
</resources> </resources>