Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

ExpandingPager

> 编程语言
Open source

ExpandingPager is a card peek/pop controller

1.9K stars0 likes0 views
WebsiteGitHub

About

ExpandingPager is a card peek/pop controller

ExpandingPager

##only support system 5.0/latest!!!who can solve before 5.0 support!!!

ExpandingPager is a card peek/pop controller

####SIZE & FRAGMENT AREA

#Setup

Just extends ExpandingViewPagerAdapter in your Fragment Adapter and setup the ExpandingViewPager

java
ViewPager viewPager;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    viewPager = (ViewPager) findViewById(...);
     
    viewPager.setAdapter( new CustomViewPagerAdapter(getSupportFragmentManager()) );

    ExpandingFactory.setupViewPager(ViewPager viewPager);
}

##Adapter

Just extends ExpandingViewPagerAdapter in your Fragment Adapter, which returns ExpandingFragment`

java
public class CustomViewPagerAdapter extends ExpandingViewPagerAdapter {

    @Override
    public Fragment getItem(int position) {
        return CustomExpandingFragment.newInstance();
    }

}

Your ExpandingFragment must returns a FragmentTop and a FragmentBottom

java
public class CustomExpandingFragment extends ExpandingFragment {

    @Override
    public Fragment getFragmentFront() {
        return CustomFragmentTop.newInstance();
    }

    @Override
    public Fragment getFragmentBottom() {
        return CustomFragmentBottom.newInstance();
    }
}

##Fragments

###Top please do not set full screen click Event,it maybe can prevent the main click Event.

java
public class CustomFragmentTop extends Fragment  {
    
  
}

##Bottom

Create your top fragment implementing ExpandingFragment.ChildTop

java
public class CustomFragmentBottom extends Fragment  {
    

}

##BackPress

java
@Override
public void onBackPressed() {
    if(!expandingViewPager.onBackPressed(viewPager)){
        super.onBackPressed();
    }
}

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javacard-peekfragmentsviewpager

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言