title: Android replace fragment from one to another is not working
body: <p>I am trying to open a fragment on button click. Button click is already in a fragment. So what I trying to do is to open a fragment from another fragment. I google it thoroughly and found this code </p>
  
  <pre><code>    FragmentInner_Add_Location fragment = new FragmentInner_Add_Location();
      FragmentTransaction transaction =  getFragmentManager().beginTransaction();
      transaction.replace(R.id.fragment_container, fragment);
      transaction.addToBackStack(null);
      transaction.commit();
  </code></pre>
  
  <p>i got this error in replace method.</p>
  
  <pre><code>Wrong second argument type. Found com.(my package name) required android.support.v4.app.fragment.
  </code></pre>
  
  <p>I really dont understand the issue here. Am I missing something?
  Here is my other fragment code (The fragment I am trying to call)</p>
  
  <pre><code>public class FragmentInner_Add_Location extends Fragment  {
      View view;
      private static final String LOG_TAG = "ExampleApp";
  
      private static final String PLACES_API_BASE = "https://maps.googleapis.com/maps/api/place";
      private static final String TYPE_AUTOCOMPLETE = "/autocomplete";
      private static final String OUT_JSON = "/json";
  
      //------------ make your specific key ------------
      private static final String API_KEY = "AIzaSyDLUTzdwYKCFKpnMWKGTCaC_TnleKeKFSU";
      public FragmentInner_Add_Location() {
  
      }
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
  
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
                 setHasOptionsMenu(true);
          view=inflater.inflate(R.layout.fragment_main_fav_location_main_layout, null);
          AutoCompleteTextView autoCompView = (AutoCompleteTextView) view.findViewById(R.id.tv_auto_complete_location);
  
          autoCompView.setAdapter(new GooglePlacesAutocompleteAdapter(getActivity(), R.layout.fragment_inner_add_location_row_items));
  //      autoCompView.setOnItemClickListener();
          autoCompView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
              @Override
              public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                  String str = (String) parent.getItemAtPosition(position);
                  Toast.makeText(getActivity(), str, Toast.LENGTH_SHORT).show();
              }
          });
          return view;
  
  
  
      }
      public static ArrayList&lt;String&gt; autocomplete(String input) {
          ArrayList&lt;String&gt; resultList = null;
  
          HttpURLConnection conn = null;
          StringBuilder jsonResults = new StringBuilder();
          try {
              StringBuilder sb = new StringBuilder(PLACES_API_BASE + TYPE_AUTOCOMPLETE + OUT_JSON);
              sb.append("?key=" + API_KEY);
              sb.append("&amp;components=country:gr");
              sb.append("&amp;input=" + URLEncoder.encode(input, "utf8"));
  
              URL url = new URL(sb.toString());
  
              System.out.println("URL: "+url);
              conn = (HttpURLConnection) url.openConnection();
              InputStreamReader in = new InputStreamReader(conn.getInputStream());
  
              // Load the results into a StringBuilder
              int read;
              char[] buff = new char[1024];
              while ((read = in.read(buff)) != -1) {
                  jsonResults.append(buff, 0, read);
              }
          } catch (MalformedURLException e) {
              Log.e(LOG_TAG, "Error processing Places API URL", e);
              return resultList;
          } catch (IOException e) {
              Log.e(LOG_TAG, "Error connecting to Places API", e);
              return resultList;
          } finally {
              if (conn != null) {
                  conn.disconnect();
              }
          }
  
          try {
  
              // Create a JSON object hierarchy from the results
              JSONObject jsonObj = new JSONObject(jsonResults.toString());
              JSONArray predsJsonArray = jsonObj.getJSONArray("predictions");
  
              // Extract the Place descriptions from the results
              resultList = new ArrayList&lt;String&gt;(predsJsonArray.length());
              for (int i = 0; i &lt; predsJsonArray.length(); i++) {
                  System.out.println(predsJsonArray.getJSONObject(i).getString("description"));
                  System.out.println("============================================================");
                  resultList.add(predsJsonArray.getJSONObject(i).getString("description"));
              }
          } catch (JSONException e) {
              Log.e(LOG_TAG, "Cannot process JSON results", e);
          }
  
          return resultList;
      }
  
  }
  </code></pre>