

void Bundle savedInstanceState) else if(itemId = R.id.fragment_menu_tech)ĪlertDialog alertDialog = new AlertDialog.Builder(getActivity()). We can create Fragments by extending Fragment class or by inserting a Fragment into our Activity layout by declaring the Fragment in the activitys layout file.


Create a fragment menu items layout xml file. A Fragment represents a reusable portion of your apps UI.How To Add Menu Items For Android Fragment. Here is how I am currently trying to do so: I can't seem to properly figure out how to access the fragments TextView and alter its text. The client server communication is no issue as the client thread is receiving the strings just fine. I am making an app that is using Fragments and wish to change the text in a TextView based on a message received in a client thread communicating with a laptop.
