@Override public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN:{ if(header == null){ header = (TextView) ((View)getParent()).findViewById(R.id.floating_header); } setHeaderTextAndscroll(event); header.setVisibility(View.VISIBLE); setBackgroundResource(R.drawable.ease_sidebar_background_pressed); return true; } case MotionEvent.ACTION_MOVE:{ setHeaderTextAndscroll(event); return true; } case MotionEvent.ACTION_UP: header.setVisibility(View.INVISIBLE); setBackgroundColor(Color.TRANSPARENT); return true; case MotionEvent.ACTION_CANCEL: header.setVisibility(View.INVISIBLE); setBackgroundColor(Color.TRANSPARENT); return true; } return super.onTouchEvent(event); }
@Override public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN:{ if(header == null){ header = (TextView) ((View)getParent()).findViewById(R.id.floating_header); } setHeaderTextAndscroll(event); header.setVisibility(View.VISIBLE); setBackgroundResource(R.drawable.ease_sidebar_background_pressed); return true; } case MotionEvent.ACTION_MOVE:{ setHeaderTextAndscroll(event); return true; } case MotionEvent.ACTION_UP: header.setVisibility(View.INVISIBLE); setBackgroundColor(Color.TRANSPARENT); return true; case MotionEvent.ACTION_CANCEL: header.setVisibility(View.INVISIBLE); setBackgroundColor(Color.TRANSPARENT); return true; } return super.onTouchEvent(event); }
@Override public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN:{ if(header == null){ header = (TextView) ((View)getParent()).findViewById(R.id.floating_header); } setHeaderTextAndscroll(event); header.setVisibility(View.VISIBLE); setBackgroundResource(R.drawable.ease_sidebar_background_pressed); return true; } case MotionEvent.ACTION_MOVE:{ setHeaderTextAndscroll(event); return true; } case MotionEvent.ACTION_UP: header.setVisibility(View.INVISIBLE); setBackgroundColor(Color.TRANSPARENT); return true; case MotionEvent.ACTION_CANCEL: header.setVisibility(View.INVISIBLE); setBackgroundColor(Color.TRANSPARENT); return true; } return super.onTouchEvent(event); }
@Override public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN:{ if(header == null){ header = (TextView) ((View)getParent()).findViewById(R.id.floating_header); } setHeaderTextAndscroll(event); header.setVisibility(View.VISIBLE); setBackgroundResource(R.drawable.ease_sidebar_background_pressed); return true; } case MotionEvent.ACTION_MOVE:{ setHeaderTextAndscroll(event); return true; } case MotionEvent.ACTION_UP: header.setVisibility(View.INVISIBLE); setBackgroundColor(Color.TRANSPARENT); return true; case MotionEvent.ACTION_CANCEL: header.setVisibility(View.INVISIBLE); setBackgroundColor(Color.TRANSPARENT); return true; } return super.onTouchEvent(event); }
@Override public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN:{ if(header == null){ header = (TextView) ((View)getParent()).findViewById(R.id.floating_header); } setHeaderTextAndscroll(event); header.setVisibility(View.VISIBLE); setBackgroundResource(R.drawable.ease_sidebar_background_pressed); return true; } case MotionEvent.ACTION_MOVE:{ setHeaderTextAndscroll(event); return true; } case MotionEvent.ACTION_UP: header.setVisibility(View.INVISIBLE); setBackgroundColor(Color.TRANSPARENT); return true; case MotionEvent.ACTION_CANCEL: header.setVisibility(View.INVISIBLE); setBackgroundColor(Color.TRANSPARENT); return true; } return super.onTouchEvent(event); }