1.導第三方jar包 nineoldandroids
2.
在onscrollchanged方法裏面填入這幾句代碼
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
//向右滑動時scale的值就會變大,settranslationx的值就會變大,mmenu就會顯示的越多
float scale = l*1.0f/mMenuWidth;
super.onScrollChanged(l, t, oldl, oldt);
ViewHelper.setTranslationX(mMenu, mMenuWidth*scale);
}