@Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_restaurant, container, false); // ((MainActivity)getActivity()).loadRestFragment("menuItems"); IVBackgroundRestaurant = (ImageView) view.findViewById(R.id.IVBackgroundRestaurant); IVBackgroundRestaurant.setImageDrawable(getResources().getDrawable(R.drawable.restaurant)); IVBackgroundRestaurant.setColorFilter( Color.rgb(100, 100, 100), android.graphics.PorterDuff.Mode.MULTIPLY); TVRestPageRestName = (TextView) view.findViewById(R.id.TVRestPageRestName); TVRestPageRestName.setText(Utility.ucFirst(State.foodItem.getRestName())); TVRestPageRestAddress = (TextView) view.findViewById(R.id.TVRestPageRestAddress); TVRestPageRestAddress.setText(Utility.ucFirst(State.foodItem.getLocality())); menuManager = new MenuManager(getActivity()); menuManager.execute(""); return view; }