diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java b/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java index 06176e6..f716332 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java @@ -105,7 +105,7 @@ public class MainActivity extends AppCompatActivity //Initialize DatabaseHelper dbHelper = DatabaseHelper.getInstance(this); - //Intialize conversation list helper + //Initialize conversation list helper conversationsListHelper = new ConversationsListHelper(this, dbHelper); //If it is the first time the application is launched, start the user friends tab @@ -155,6 +155,12 @@ public class MainActivity extends AppCompatActivity //Get action id int id = item.getItemId(); + //To display the list of friends + if(id == R.id.action_friends_list){ + openFriendsFragment(); + return true; + } + //Check for logout request if(id == R.id.action_logout){ confirmUserLogout(); @@ -178,9 +184,9 @@ public class MainActivity extends AppCompatActivity switch (item.getItemId()) { //If the user clicked to show the friends list - case R.id.main_bottom_navigation_friends_list: + /*case R.id.main_bottom_navigation_friends_list: openFriendsFragment(); - return true; + return true;*/ //If the user chose to show information about him case R.id.main_bottom_navigation_me_view: diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/FriendsListFragment.java b/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/FriendsListFragment.java index c9572d0..aaec60d 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/FriendsListFragment.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/FriendsListFragment.java @@ -148,7 +148,8 @@ public class FriendsListFragment extends Fragment //Update the bottom navigation menu ((MainActivity) getActivity()) - .setSelectedNavigationItem(R.id.main_bottom_navigation_friends_list); + //.setSelectedNavigationItem(R.id.main_bottom_navigation_friends_list); + .setSelectedNavigationItem(R.id.main_bottom_navigation_me_view); //Refresh the friends list refresh_friend_list(); diff --git a/app/src/main/res/menu/main_bottom_navigation.xml b/app/src/main/res/menu/main_bottom_navigation.xml index b29acce..27036b1 100644 --- a/app/src/main/res/menu/main_bottom_navigation.xml +++ b/app/src/main/res/menu/main_bottom_navigation.xml @@ -1,10 +1,16 @@ + + + + + + Show / Hide create post form. The content of the post is too short! An error occurred while trying to create the post! + Notifications + Friends list