use of com.mrane.campusmap.FuzzySearchAdapter in project IITB-App by wncc.
the class MapFragment method setupMap.
private void setupMap(String initalMarkerName) {
if (getView() == null) {
return;
}
newSmallCard = (LinearLayout) getActivity().findViewById(R.id.new_small_card);
slidingLayout = (SlidingUpPanelLayout) getActivity().findViewById(R.id.sliding_layout);
placeNameTextView = (TextView) getActivity().findViewById(R.id.place_name);
placeColor = (ImageView) getActivity().findViewById(R.id.place_color);
placeSubHeadTextView = (TextView) getActivity().findViewById(R.id.place_sub_head);
cardSlideListener = new CardSlideListener(this);
slidingLayout.setPanelSlideListener(cardSlideListener);
slidingLayout.post(setAnchor());
initShowDefault();
initImageUri();
fragmentContainer = (RelativeLayout) getActivity().findViewById(R.id.fragment_container);
adapter = new FuzzySearchAdapter(getContext(), markerlist);
editText = (EditText) getView().findViewById(R.id.search);
editText.addTextChangedListener(this);
editText.setOnEditorActionListener(this);
editText.setOnFocusChangeListener(this);
settingsManager = new SettingsManager(getContext());
campusMapView = (CampusMapView) getActivity().findViewById(R.id.campusMapView);
campusMapView.initialise(this);
campusMapView.setImageAsset("map.jpg");
campusMapView.setSettingsManager(settingsManager);
campusMapView.setData(data);
campusMapView.setInitialMarkerName(initalMarkerName);
addMarkerIcon = (ImageButton) getActivity().findViewById(R.id.add_marker_icon);
fragmentManager = getChildFragmentManager();
listFragment = (new ListFragment()).forFragment(this);
adapter.setSettingsManager(settingsManager);
initSoundPool();
setFonts();
getActivity().findViewById(R.id.add_marker_icon).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
addMarkerClick(v);
}
});
getActivity().findViewById(R.id.share_map_icon).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String shareUrl = ShareURLMaker.getMapURL(campusMapView.getResultMarker());
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("text/plain");
i.putExtra(Intent.EXTRA_SUBJECT, "Sharing URL");
i.putExtra(Intent.EXTRA_TEXT, shareUrl);
startActivity(Intent.createChooser(i, "Share URL"));
}
});
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
}
Aggregations