{"id":13641671,"url":"https://github.com/Pixplicity/MultiViewPager","last_synced_at":"2025-04-20T11:31:34.240Z","repository":{"id":20768454,"uuid":"24053176","full_name":"Pixplicity/MultiViewPager","owner":"Pixplicity","description":"The MultiViewPager is an extension of the support-v4 library's ViewPager that allows the pages to be wider or narrower than the ViewPager itself. It takes care of aligning the pages next to each other, and always keeping the selected page centered.","archived":false,"fork":false,"pushed_at":"2016-08-31T10:39:11.000Z","size":864,"stargazers_count":906,"open_issues_count":4,"forks_count":120,"subscribers_count":35,"default_branch":"master","last_synced_at":"2024-08-03T01:24:26.384Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pixplicity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-15T11:02:49.000Z","updated_at":"2024-06-10T14:49:41.000Z","dependencies_parsed_at":"2022-09-03T11:42:14.972Z","dependency_job_id":null,"html_url":"https://github.com/Pixplicity/MultiViewPager","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixplicity%2FMultiViewPager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixplicity%2FMultiViewPager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixplicity%2FMultiViewPager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixplicity%2FMultiViewPager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pixplicity","download_url":"https://codeload.github.com/Pixplicity/MultiViewPager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223827527,"owners_count":17209800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:01:22.892Z","updated_at":"2024-11-09T12:30:43.067Z","avatar_url":"https://github.com/Pixplicity.png","language":"Java","readme":"MultiViewPager\n==============\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-MultiViewPager-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1489)\n[![Build Status](https://travis-ci.org/Pixplicity/MultiViewPager.svg?branch=master)](https://travis-ci.org/Pixplicity/MultiViewPager)\n\n*UPDATE:* This behavior is now included in the RecyclerView for support lib 24.2.0 and later. Please look at using [LinearSnapHelper](https://developer.android.com/reference/android/support/v7/widget/LinearSnapHelper.html).\n\nThe MultiViewPager is an extension of the support-v4 library's ViewPager that allows the pages to be wider or narrower than the ViewPager itself. It takes care of aligning the pages next to each other, and always keeping the selected page centered.\n\n![Sample app](http://i.imgur.com/0yGMSyE.gif)\n\n## Sample\n\nSimply add the MultiViewPager into your layout:\n\n    \u003ccom.pixplicity.multiviewpager.MultiViewPager\n        android:id=\"@+id/pager\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        app:matchChildWidth=\"@+id/child_view_to_match\" /\u003e\n\nBe sure to declare the `app` namespace:  \n`xmlns:app=\"http://schemas.android.com/apk/res-auto\"`\n\nTake note of the custom attribute `matchChildWidth`. This attribute should match an ID in the ViewPager's first child view. In the sample project, the layout of the pages is:\n\n\t\u003cRelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n\t    xmlns:tools=\"http://schemas.android.com/tools\"\n\t    android:layout_width=\"match_parent\"\n\t    android:layout_height=\"match_parent\"\n\t    tools:context=\"${relativePackage}.${activityClass}\" \u003e\n\t\n\t    \u003cFrameLayout\n\t        android:id=\"@+id/vg_cover\"\n\t        android:layout_width=\"200dp\"\n\t        android:layout_height=\"match_parent\"\n\t        android:layout_centerInParent=\"true\" \u003e\n\t\n\t        \u003cImageView\n\t            android:layout_width=\"match_parent\"\n\t            android:layout_height=\"match_parent\"\n\t            android:padding=\"16dp\"\n\t            android:background=\"@drawable/bg_page\"\n\t            android:scaleType=\"centerInside\"\n\t            android:src=\"@drawable/im_pixplicity\"\n\t            tools:ignore=\"ContentDescription\" /\u003e\n\t            \n\t    \u003c/FrameLayout\u003e\n\t\n\t\u003c/RelativeLayout\u003e\n\nThe child view with ID `@id/vg_cover` will determine the width of the page. In this example, the width would be 200dp. In order to get this hooked up, we provide MultiViewPager with the reference to the child, `@id/vg_cover`:\n\n    \u003ccom.pixplicity.multiviewpager.MultiViewPager\n        android:id=\"@+id/pager\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        app:matchChildWidth=\"@+id/vg_cover\" /\u003e\n\nIn this way, it knows to size the pages according to the dimension of that View or ViewGroup.\n\n## Download\n\nDownload the latest [AAR](http://search.maven.org/#search|ga|1|g:\"com.pixplicity.multiviewpager\") or grab via Maven:\n```XML\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.pixplicity.multiviewpager\u003c/groupId\u003e\n  \u003cartifactId\u003elibrary\u003c/artifactId\u003e\n  \u003cversion\u003e1.0\u003c/version\u003e\n  \u003ctype\u003eaar\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\nor Gradle:\n```Java\ncompile 'com.pixplicity.multiviewpager:library:1.0'\n```\n\n## License\n\nLicensed under the Apache license.\n","funding_links":[],"categories":["ViewPager","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPixplicity%2FMultiViewPager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPixplicity%2FMultiViewPager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPixplicity%2FMultiViewPager/lists"}