android menu pager

🔥 An android library to get simple menu options to 💪. Inspired by AndroidResideMenu.


AndroidPub(Medium) Post

You can read the AndroidPub post about this library, the perks it provides and other details here.


Add this in your root build.gradle file (not your module build.gradle file):


Add this to your module’s build.gradle file (make sure the version matches the JitPack badge above):


  • Add the layout in your XML file for the activity, like this:

  • Configure the layout and add the fragments like this:PagerLayout pager = findViewById(;List<String> titleList =newArrayList<>(); titleList.add(“Page1”); titleList.add(“Page2”); titleList.add(“Page3”); titleList.add(“Page4”); titleList.add(“Page5”);if(pager ==null) Log.i(“Pager_Null”,”Pager is null”);pager.setTitles(titleList);fragments.add(newPage1()); fragments.add(newPage2()); fragments.add(newPage3()); fragments.add(newPage4()); fragments.add(newPage5());FragmentPagerAdapter adapter =newFragmentPagerAdapter(getSupportFragmentManager()) { @OverridepublicFragmentgetItem(intposition) { return fragments.get(position); }@OverridepublicintgetCount() { return fragments.size(); } };pager.setAdapter(adapter);
    • See the app code to know more about this.

 970 total views,  1 views today

(Visited 119 times, 1 visits today)