Search in sources :

Example 1 with CardSlideListener

use of com.mrane.navigation.CardSlideListener 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);
}
Also used : SettingsManager(com.mrane.campusmap.SettingsManager) CardSlideListener(com.mrane.navigation.CardSlideListener) ListFragment(com.mrane.campusmap.ListFragment) Intent(android.content.Intent) ImageView(android.widget.ImageView) SubsamplingScaleImageView(com.mrane.zoomview.SubsamplingScaleImageView) View(android.view.View) AdapterView(android.widget.AdapterView) TextView(android.widget.TextView) ListView(android.widget.ListView) CampusMapView(com.mrane.zoomview.CampusMapView) ExpandableListView(android.widget.ExpandableListView) FuzzySearchAdapter(com.mrane.campusmap.FuzzySearchAdapter)

Aggregations

Intent (android.content.Intent)1 View (android.view.View)1 AdapterView (android.widget.AdapterView)1 ExpandableListView (android.widget.ExpandableListView)1 ImageView (android.widget.ImageView)1 ListView (android.widget.ListView)1 TextView (android.widget.TextView)1 FuzzySearchAdapter (com.mrane.campusmap.FuzzySearchAdapter)1 ListFragment (com.mrane.campusmap.ListFragment)1 SettingsManager (com.mrane.campusmap.SettingsManager)1 CardSlideListener (com.mrane.navigation.CardSlideListener)1 CampusMapView (com.mrane.zoomview.CampusMapView)1 SubsamplingScaleImageView (com.mrane.zoomview.SubsamplingScaleImageView)1