Description
A PagedGrid is a ViewPager which pages are GridLayout with equal distributed rows and columns.This project is an Android library, written in Kotlin, that helps you create a PagedGrid component and manage its pages and cell views.
This module provides a component with no added features, but a simple way to rapidly create particular Android views reducing the complexity, for example control panels, launchers and tables.
PagedGrid alternatives and similar packages
Based on the "Kotlin" category.
Alternatively, view PagedGrid alternatives based on common mentions on social networks and blogs.
-
CalendarView
A highly customizable calendar view and compose library for Android and Kotlin Multiplatform. -
Balloon
:balloon: Modernized and sophisticated tooltips, fully customizable with an arrow and animations for Android. -
kotlin-android-template
Android + Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc = โค๏ธ -
NotyKT ๐๏ธ
๐ NotyKT is a complete ๐Kotlin-stack (Backend + Android) ๐ฑ application built to demonstrate the use of Modern development tools with best practices implementation๐ฆธ. -
Material Chip View
Material Chip view. Can be used as tags for categories, contacts or creating text clouds -
DrawableToolbox
๐ ๏ธ The missing drawable toolbox for Android. Create drawables programmatically and get rid of the boring and always repeated drawable.xml files. -
Navigation Toolbar for Android
:octocat: Navigation toolbar is a slide-modeled UI navigation controller made by @Ramotion -
Pdf Viewer For Android
A Lightweight PDF Viewer Android library which only occupies around 80kb while most of the Pdf viewer occupies up to 16MB space. -
Capturable
๐Jetpack Compose utility library for capturing Composable content and transforming it into Bitmap Image๐ผ๏ธ -
Carousel Recyclerview
Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager. -
Pluto Debug Framework
Android Pluto is a on-device debugging framework for Android applications, which helps intercept Network calls, capture Crashes & ANRs, manipulate application data on-the-go, and much more. -
SSComposeCookBook
A Collection of major Jetpack compose UI components which are commonly used.๐๐๐ -
CrunchyCalendar โ awesome calendar widget for android apps
A beautiful material calendar with endless scroll, range selection and a lot more! -
SSCustomBottomNavigation
Animated TabBar with native control and Jetpack Navigation support..โจ๐๐ -
Permission Flow for Android
Know about real-time state of a Android app Permissions with Kotlin Flow APIs. -
Only
:bouquet: An easy way to persist and run code block only as many times as necessary on Android. -
Nextflix-Composable
Includes jetpack compose, navigation, paging, hilt, retrofit, coil, coroutines, flow.. -
EasyPermissions-ktx
๐ Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher. -
Compose Compiler Reports to HTML Generator
A utility (Gradle Plugin + CLI) to convert Jetpack Compose compiler metrics and reports to beautified HTML page. -
FlowMVI
Architecture Framework for Kotlin. Reuse every line of code. Build features in minutes. Analytics, metrics, debugging in 3 lines of code. Make all code thread-safe. Handle all errors automatically. 50+ features. -
Events Calendar
Events Calendar is a user-friendly library that helps you achieve a cool Calendar UI with events mapping. You can customise every pixel of the calendar as per your wish and still achieve in implementing all the functionalities of the native android calendar in addition with adding dots to the calendar which represents the presence of an event on the respective dates. It can be done easily, you are just a few steps away from implementing your own badass looking Calendar for your very own project! -
MidJourney Images Compose Multiplatform Mobile Application
This application is developed to display the images created by MidJourney. The application is developed with Compose Multiplatform and works on many platforms including Android and iOS platforms. -
Bytemask
Android Gradle Plugin that masks secret strings for the app in the source code making it difficult to extract from reverse engineering. -
SSCustomEditTextOutLineBorder
Same as the Outlined text fields presented on the Material Design page but with some dynamic changes. ๐ ๐
CodeRabbit: AI Code Reviews for Developers
Do you think we are missing an alternative of PagedGrid or a related project?
README
PagedGrid
A PagedGrid
is a ViewPager
which pages are GridLayout
with equal distributed rows and columns.
This project is an Android library, written in Kotlin, that helps you create a PagedGrid
component and manage its pages and cell views.
Motivation
This module provides a component with no added features, but a simple way to rapidly create particular Android views reducing the complexity, for example control panels, launchers and tables.
[](readme_res/portrait.gif)
Getting started
Add the module as dependency using the latest version number, specified above.
Add the JitPack repository to your build file
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependency using the latest version number, specified above.
dependencies {
implementation 'com.github.arabello:PagedGrid:x.x.x'
}
It is possible to build the latest commit on the master branch, using the tag master-SNAPSHOT
dependencies {
implementation 'com.github.arabello:PagedGrid:master-SNAPSHOT'
}
Usage
Notation: (ColumnIndex, RowIndex) [ColumnIndex, RowIndex]
Add the custom view to your layout
<io.matteopellegrino.pagedgrid.PagedGridView
android:id="@+id/pagedGridView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
Assign an instance of GridAdapter
to the PagedGrid
val gridAdapter = GridAdapter(arrayOf())
pagedGridView.adapter = gridAdapter
Create an EmptyGrid
page, specifying the number of columns and rows
val page1 = EmptyGrid(4, 5)
The page (grid) is a matrix of Element
interface.
DrawableIcon
and BitmapIcon
are ready to use implementation of Element
.
Add an element to the page using column and rows indexes.
page1[0, 2] = DrawableIcon("Photo Filter", R.drawable.ic_photo_filter_black_24dp)
page1[2, 2] = DrawableIcon("Portrait", R.drawable.ic_portrait_black_24dp)
You can create your own element just extending AbstractElement
.
page1[1, 1] = object : AbstractElement() {
override fun inflateView(parent: ViewGroup): View {
val layout = LayoutInflater.from(parent.context).inflate(R.layout.custom, null)
val img = layout.findViewById(R.id.img)
val txt = layout.findViewById(R.id.txt)
img.scaleType = ImageView.ScaleType.CENTER_CROP
img.setImageBitmap(BitmapFactory.decodeResource(resources, R.mipmap.img_4))
txt.setText(R.string.mytext)
return layout
}
}
Once pages are ready, add them (or assign) to the adapter and notify the changes.
gridAdapter.pages += page1
gridAdapter.notifyDataSetChanged()
The method setOnInflateViewListener
allows you to access the cell View
when created, extremely
useful for attaching Android events.
You can easily iterate over pages and cells (elements) as showed below.
gridAdapter.pages.forEach { page ->
page.forEachIndexed { x, y, elem ->
elem.setOnInflateViewListener { view ->
view.setOnClickListener {
Toast.makeText(baseContext, "View on ($x, $y) clicked", Toast.LENGTH_SHORT).show()
}
}
}
}
For further details and specific uses case, please see the sample app
Personalization
Here the personalization properties (first value as default)
<io.matteopellegrino.pagedgrid.PagedGridView
app:animationEnabled="true|false"
app:orientation="portrait|landscape"
app:pageIndicatorUnselected="@android:color/gray"
app:pageIndicatorSelected="@android:color/black" />
Animation
When the content of a page change and it is currently displayed, the component animates the transition to the new content as showed below.
[](readme_res/animation.gif)
Landscape
The landscape mode is supported, but it is severely rigid. The component is rotated clockwise only and the scroll becomes vertical. In this way
the coordinate of each element related to a page remain the same considering the top-left corner as the origin (0,0)
[](readme_res/landscape.gif)
Credits
For the third party dependencies, thanks to
For the sample app illustrations, thanks to unDraw
License
MIT License
Copyright (c) 2018 Matteo Pellegrino
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*Note that all licence references and agreements mentioned in the PagedGrid README section above
are relevant to that project's source code only.