jfeinstein10 / SlidingMenu

An Android library that allows you to easily create applications with slide-in menus. You may use it in your Android apps provided that you cite this project and include the license in your app. Thanks!
Apache License 2.0
11.08k stars 5.04k forks source link

I use ‘SlidingMenu + ActionBarSherlock + PullToRefreshListView + ViewPager‘; #473

Open wuyexiong opened 11 years ago

wuyexiong commented 11 years ago

I use ‘SlidingMenu + ActionBarSherlock + PullToRefreshView + ViewPager‘;

And this is my View;

view

I write the code lick this , and work well; https://github.com/jfeinstein10/SlidingMenu/blob/master/example/src/com/jeremyfeinstein/slidingmenu/example/ViewPagerActivity.java

wuyexiong commented 11 years ago

Like this App

https://play.google.com/store/apps/details?id=com.verge.android&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS52ZXJnZS5hbmRyb2lkIl0.

wuyexiong commented 11 years ago

I have already fix it , But it can't pull down to refresh

 mViewPager.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                if(mViewPager.getCurrentItem() != 0)
                {
                    v.getParent().requestDisallowInterceptTouchEvent(true);
                }
                return false;
            }
        });
saynull commented 11 years ago

I like you with the layout being developed. I received a lot of help in your source. I fiexd that should not refresh the scroll view.

//source

    mPullToRefreshScrollView = (PullToRefreshScrollView)findViewById(R.id.customScrollView);
    mPullToRefreshScrollView.setOnRefreshListener(new OnRefreshListener<ScrollView>() {
        @Override
        public void onRefresh(PullToRefreshBase<ScrollView> refreshView) {
            new GetDataTask().execute();
        }
    });

    mScrollView = mPullToRefreshScrollView.getRefreshableView();

    mPager = (ViewPager)findViewById(R.id.pager);
    mPager.setAdapter(new ViewPagerAdapter(getSupportFragmentManager()));       
    mPager.setOnTouchListener(new View.OnTouchListener() {
        @Override
        public boolean onTouch(View v, MotionEvent event) {
            mPullToRefreshScrollView.getParent().requestDisallowInterceptTouchEvent(true);
            return false;
        }
    });

//source end

My answer to you, I hope power..

hm... I've sent an email to you, you have no answer..

Let's development while sharing other sources.

I do not speak English well.

If this is not the correct interpretation shall use the Google Translator.

tian9246 commented 11 years ago

楼上二位可以直接写中文

gavinliu commented 11 years ago

哈哈~~由于订阅了SlidingMenu,每个回复都会收到邮件、看到中国人,真好

2013/7/11, tian9246 notifications@github.com:

楼上二位可以直接写中文


Reply to this email directly or view it on GitHub: https://github.com/jfeinstein10/SlidingMenu/issues/473#issuecomment-20794573

wuyexiong commented 11 years ago

非常感谢,问题已经解决。

shawnlinboy commented 11 years ago

雄哥啊,微博上还认识你呢,哈哈~~~

szitguy commented 11 years ago

i find a better method,refer to https://github.com/jfeinstein10/SlidingMenu/issues/326