https://github.com/pradyuman7/pager
🔥 An android library to get simple menu options on steroids 💪
https://github.com/pradyuman7/pager
android android-library android-menu android-ui beautiful-ui customisation java library menu page
Last synced: 10 months ago
JSON representation
🔥 An android library to get simple menu options on steroids 💪
- Host: GitHub
- URL: https://github.com/pradyuman7/pager
- Owner: Pradyuman7
- License: gpl-3.0
- Created: 2019-02-19T04:42:17.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-14T02:04:22.000Z (over 6 years ago)
- Last Synced: 2024-03-27T20:50:22.275Z (almost 2 years ago)
- Topics: android, android-library, android-menu, android-ui, beautiful-ui, customisation, java, library, menu, page
- Language: Java
- Homepage:
- Size: 612 KB
- Stars: 69
- Watchers: 4
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Pager
[](https://www.jitpack.io/#Pradyuman7/Pager)
[](https://android-arsenal.com/api?level=15)
[](https://android-arsenal.com/details/1/7537)
[](https://github.com/Pradyuman7/Pager)
[](https://www.androiddevdigest.com/digest-219/)
[](
https://uxplanet.org/ui-libraries-by-top-app-developers-12588746efb0)
[](https://androidweekly.cn/android-dev-weekly-issue-218/)
[](https://android.libhunt.com/pager-alternatives)
[  ](https://bintray.com/pradyuman7/Pager/Pager/V1.0/link)
🔥 An android library to get simple menu options to 💪. Inspired by AndroidResideMenu.
## GIF
## AndroidPub(Medium) Post
[You can read the AndroidPub post about this library, the perks it provides and other details here.](https://medium.com/@pradyumandixit/how-to-get-your-menu-options-on-steroids-aef1b5a40862)
## Prerequisites
Add this in your root `build.gradle` file (**not** your module `build.gradle` file):
```gradle
allprojects {
repositories {
...
maven { url 'https://www.jitpack.io' }
}
}
```
## Dependency
Add this to your module's `build.gradle` file (make sure the version matches the JitPack badge above):
```gradle
dependencies
implementation 'com.github.Pradyuman7:Pager:V1.1'
}
```
## Usage
- Add the layout in your XML file for the activity, like this:
```XML
```
***
```XMl
```
***
- Configure the layout and add the fragments like this:
```java
PagerLayout pager = findViewById(R.id.rl_main);
List titleList = new ArrayList<>();
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(new Page1());
fragments.add(new Page2());
fragments.add(new Page3());
fragments.add(new Page4());
fragments.add(new Page5());
FragmentPagerAdapter adapter = new FragmentPagerAdapter(getSupportFragmentManager()) {
@Override
public Fragment getItem(int position) {
return fragments.get(position);
}
@Override
public int getCount() {
return fragments.size();
}
};
pager.setAdapter(adapter);
```
- See the app code to know more about this.
## Pull Request
Have some new ideas or found a bug? Do not hesitate to open an `issue` and make a `pull request`.
## License
**Pager** is under [](https://www.gnu.org/licenses/gpl-3.0). See the [LICENSE](LICENSE.md) file for more info.