5

I am using moondroid Coverflow and its working fine with my code. Now I want the item to stop scroll when it reaches its end position. As currently there is no end for scrolling. Can anybody help me out to solve. Also want to know is there any default method in Coverflow to do the above mentioned activity.

  private void setCoverFlowMapView(List<PropertyRS> proReplica, Integer posMarker) {

    //moondroid coverflow 2826
    mData = (ArrayList<PropertyRS>) proReplica;
    mCoverFlow = (FeatureCoverFlow) rootView.findViewById(R.id.coverflow);
    mAdapter = new CoverFlowAdapter(getActivity(), this,posMarker);
    mAdapter.setData(mData);
    mCoverFlow.setAdapter(mAdapter);
    mCoverFlow.computeScroll();


    if (posMarker != null) {
        mCoverFlow.scrollToPosition(posMarker);
    }
    mCoverFlow.setOnScrollPositionListener(new FeatureCoverFlow.OnScrollPositionListener() {
        @Override
        public void onScrolledToPosition(int position) {
            Double cvLat = mData.get(position).latitude;
            Double cvLong = mData.get(position).longitude;
            System.out.println("coverflow item position " + position);
            mAdapter.setPos(position);
            ((BaseAdapter)mCoverFlow.getAdapter()).notifyDataSetChanged();
            LatLng cvLatLng = new LatLng(cvLat, cvLong);
            CameraUpdate cvCameraUpdate = CameraUpdateFactory.newLatLngZoom(cvLatLng, 15);
            googleMap.animateCamera(cvCameraUpdate);         

        }

        @Override
        public void onScrolling() {

        }
    });
}
Munchoo
  • 313
  • 1
  • 7
  • 22

0 Answers0