Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void SynchronizeMoveForPresence() {
- App_class.listFromPresence.setOnTouchListener(new OnTouchListener() {
- @Override
- public boolean onTouch(View v, MotionEvent event) {
- if(touchSource == null)
- touchSource = v;
- if(v == touchSource) {
- App_class.listFromListFragment.dispatchTouchEvent(event);
- if(event.getAction() == MotionEvent.ACTION_UP) {
- clickSource = v;
- touchSource = null;
- }
- }
- return false;
- }
- });
- App_class.listFromPresence.setOnScrollListener(new OnScrollListener() {
- @Override
- public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
- if(view == clickSource)
- App_class.listFromListFragment.setSelectionFromTop(firstVisibleItem, view.getChildAt(0).getTop() + offset);
- }
- @Override
- public void onScrollStateChanged(AbsListView view, int scrollState) {}
- });
- App_class.listFromListFragment.setOnTouchListener(new OnTouchListener() {
- @Override
- public boolean onTouch(View v, MotionEvent event) {
- if(touchSource == null)
- touchSource = v;
- if(v == touchSource) {
- App_class.listFromPresence.dispatchTouchEvent(event);
- if(event.getAction() == MotionEvent.ACTION_UP) {
- clickSource = v;
- touchSource = null;
- }
- }
- return false;
- }
- });
- App_class.listFromListFragment.setOnScrollListener(new OnScrollListener() {
- @Override
- public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
- if(view == clickSource)
- App_class.listFromPresence.setSelectionFromTop(firstVisibleItem, view.getChildAt(0).getTop() + offset);
- }
- @Override
- public void onScrollStateChanged(AbsListView view, int scrollState) {}
- });
- Log.i("synchronized","fsf" );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement