use of com.here.android.mpa.search.PlaceLink in project here-android-sdk-examples by heremaps.
the class ResultListActivity method onListItemClick.
/* Retrieve details of the place selected */
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
DiscoveryResult result = MapFragmentView.s_ResultList.get(position);
if (result.getResultType() == DiscoveryResult.ResultType.PLACE) {
/* Fire the PlaceRequest */
PlaceLink placeLink = (PlaceLink) result;
PlaceRequest placeRequest = placeLink.getDetailsRequest();
placeRequest.execute(m_placeResultListener);
} else if (result.getResultType() == DiscoveryResult.ResultType.DISCOVERY) {
/*
* Another DiscoveryRequest object can be obtained by calling DiscoveryLink.getRequest()
*/
Toast.makeText(this, "This is a DiscoveryLink result", Toast.LENGTH_SHORT).show();
}
}
use of com.here.android.mpa.search.PlaceLink in project here-android-sdk-examples by heremaps.
the class ResultListActivity method onListItemClick.
/* Retrieve details of the place selected */
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
DiscoveryResult result = MapFragmentView.s_discoverResultList.get(position);
if (result.getResultType() == DiscoveryResult.ResultType.PLACE) {
/* Fire the PlaceRequest */
PlaceLink placeLink = (PlaceLink) result;
PlaceRequest placeRequest = placeLink.getDetailsRequest();
placeRequest.execute(m_placeResultListener);
} else if (result.getResultType() == DiscoveryResult.ResultType.DISCOVERY) {
/*
* Another DiscoveryRequest object can be obtained by calling DiscoveryLink.getRequest()
*/
Toast.makeText(this, "This is a DiscoveryLink result", Toast.LENGTH_SHORT).show();
}
}
Aggregations