mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-27 07:49:28 +00:00
Added backward button on conversation fragment.
This commit is contained in:
parent
d2fbd4213e
commit
36cba023af
@ -188,6 +188,12 @@ public class MainActivity extends AppCompatActivity implements openConversationL
|
||||
//Get action id
|
||||
int id = item.getItemId();
|
||||
|
||||
//To go backward
|
||||
if(id == android.R.id.home){
|
||||
getSupportFragmentManager().popBackStack();
|
||||
return true;
|
||||
}
|
||||
|
||||
//To search a user
|
||||
if(id == R.id.action_search_user){
|
||||
searchUser();
|
||||
|
@ -13,6 +13,7 @@ import android.util.ArrayMap;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.EditText;
|
||||
@ -305,6 +306,8 @@ public class ConversationFragment extends Fragment
|
||||
((MainActivity) getActivity())
|
||||
.setSelectedNavigationItem(R.id.main_bottom_navigation_conversations);
|
||||
|
||||
((MainActivity) getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
//Check for conversation information
|
||||
if(conversationInfo == null){
|
||||
|
||||
@ -333,6 +336,8 @@ public class ConversationFragment extends Fragment
|
||||
super.onPause();
|
||||
|
||||
refreshRunnable.quitSafely();
|
||||
|
||||
((MainActivity) getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user