title: Changing Some UI Elements on Current Activity
body: <p><strong>Application to implement:</strong> </p>
  
  <p>User is prompted to input his source location, after that user is prompted to input his destination location. After completion, a route will appear between source and destination. </p>
  
  <p><strong>Implemented so far</strong>
  <li>Splash Screen with 500ms delay
  <li>After 500ms user is shifted to MainActivity
  <li>Here a user is prompted to enter his current location in a text box.
  <li>As user enters his source, a marker appears on google maps</p>
  
  <p><strong>About Textbox:</strong> The textbox I am using is a place autocomplete from Places API from google itself. This widget at any length of input shows specific place hints relative to the input. I am basically using the fragment implementation of this autocomplete textbox.</p>
  
  <p><strong>Problem:</strong> Now the problem I am facing is that I want my textbox that was inputting source should now input destination. What should i do change the input type?</p>
  
  <p><strong>Code:</strong> </p>
  
  <p><em>.xml file</em>
      </p>
  
  <pre><code>&lt;fragment
      android:id="@+id/place_autocomplete_fragment"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment" /&gt;
  
  &lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:map="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/map"
      android:name="com.google.android.gms.maps.SupportMapFragment"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.mazik.ahmed.androidappontheway.MapsActivity" /&gt;
  </code></pre>
  
  <p></p>
  
  <p><em>.java file</em></p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_maps);
      SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
              .findFragmentById(R.id.map);
      mapFragment.getMapAsync(this);
  
      PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)
              getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);
  
      autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {
          @Override
          public void onPlaceSelected(Place place) {
              LatLng latlng = new LatLng(place.getLatLng().latitude, place.getLatLng().longitude);
              mMap.addMarker(new MarkerOptions().position(latlng).title(place.getName().toString())
                      .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_VIOLET)));
          }
  
          @Override
          public void onError(Status status) { }
      });
  </code></pre>
  
  <p>What I want is that the autocomplete widget prompt for a re-input after assuring the source has been selected.</p>