Пример #1
0
 /** 打开菜单 */
 public void openMenu() {
   Log.i("TAG", "15");
   if (isOpen) {
     Log.i("TAG", "16");
     return;
   }
   Log.i("TAG", "17");
   this.smoothScrollTo(mScrollWidth, 0);
   isOpen = true;
   mIonSlidingButtonListener.onMenuIsOpen(this);
 }
Пример #2
0
 /** 按滚动条被拖动距离判断关闭或打开菜单 */
 public void changeScrollx() {
   Log.i("TAG", "滚动滚动条  12");
   if (getScrollX() >= (mScrollWidth / 2)) {
     this.smoothScrollTo(mScrollWidth, 0);
     isOpen = true;
     mIonSlidingButtonListener.onMenuIsOpen(this);
     Log.i("TAG", "滚动滚动条  展开  13" + isOpen);
   } else {
     Log.i("TAG", "滚动滚动条  关闭   14");
     this.smoothScrollTo(0, 0);
     isOpen = false;
   }
 }