All Projects → SimformSolutionsPvtLtd → SSJetpackComposeSwipeableView

SimformSolutionsPvtLtd / SSJetpackComposeSwipeableView

Licence: MIT license
SSJetpackComposeSwipeableView is a small library which provides support for the swipeable views. You can use this in your lazyColumns or can add a simple view which contains swipe to edit/delete functionality.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to SSJetpackComposeSwipeableView

compose-ratingbar
A ratingbar composable for jetpack compose 🚀🌟
Stars: ✭ 89 (+56.14%)
Mutual labels:  jetpack, jetpack-compose, jetpack-components
iron-swipeable-pages
[Polymer 1.x] Element that enables switching between different pages by swiping gesture.
Stars: ✭ 51 (-10.53%)
Mutual labels:  swipe-gestures, swipeable
ComposeBird
Flappy Bird game
Stars: ✭ 193 (+238.6%)
Mutual labels:  jetpack, jetpack-compose
Delish
Delish, a Food Recipes App in Jetpack Compose and Hilt based on modern Android tech-stacks and MVI clean architecture.
Stars: ✭ 356 (+524.56%)
Mutual labels:  jetpack, jetpack-compose
neon
Provides Jetpack Compose support for different image loading libraries.
Stars: ✭ 13 (-77.19%)
Mutual labels:  jetpack, jetpack-compose
Jetpack-compose-sample
Forget about bunch of XML files for maintaining UIs. Jetpack Compose is Android’s modern toolkit for building native UI. Here is a small example to get started.
Stars: ✭ 29 (-49.12%)
Mutual labels:  jetpack, jetpack-compose
Scout
Scout is a kotlin multiplatform application that allows users to search and save games to lists to be browsed later.
Stars: ✭ 28 (-50.88%)
Mutual labels:  jetpack, jetpack-compose
samples
Jetpack Compose based project, used to stress-testing compose features / integrations and explore non-trivial functionality
Stars: ✭ 21 (-63.16%)
Mutual labels:  jetpack, jetpack-compose
Strict-DataBinding
善用 DataBinding 彻底解决 “View 实例的 Null 安全一致性问题”
Stars: ✭ 84 (+47.37%)
Mutual labels:  jetpack, jetpack-compose
Praxis
Example Android project using MVVM, DaggerAndroid, Jetpack Compose, Retrofit, Coroutines and Multi module architecture ✌🏽
Stars: ✭ 258 (+352.63%)
Mutual labels:  jetpack-compose, jetpack-components
Awesome-Android-Open-Source-Projects
👓 A curated list of awesome android projects by open-source contributors.
Stars: ✭ 401 (+603.51%)
Mutual labels:  jetpack, jetpack-compose
compose-charts
Simple Jetpack Compose Charts for multi-platform. Including Android, Web, Desktop.
Stars: ✭ 30 (-47.37%)
Mutual labels:  jetpack, jetpack-compose
Coffeegram
Android app using Jetpack Compose together with StateFlow and MVI
Stars: ✭ 155 (+171.93%)
Mutual labels:  jetpack, jetpack-compose
Composecookbook
A Collection on all Jetpack compose UI elements, Layouts, Widgets and Demo screens to see it's potential
Stars: ✭ 3,516 (+6068.42%)
Mutual labels:  jetpack, jetpack-compose
JetComposer
Collection of UIs and Animations built with Jetpack Compose for Android
Stars: ✭ 294 (+415.79%)
Mutual labels:  jetpack, jetpack-compose
android-developer-roadmap
🗺 The 2022 Android Developer Roadmap suggests learning paths to understanding Android development.
Stars: ✭ 5,533 (+9607.02%)
Mutual labels:  jetpack, jetpack-compose
Wiggles
🐶 Beautiful Puppy adoption app with Jetpack Compose #AndroidDevChallenge
Stars: ✭ 365 (+540.35%)
Mutual labels:  jetpack, jetpack-compose
Compose-BreakingBad
🧪 ☠︎ Jetpack Compose - Breaking Bad ☢︎
Stars: ✭ 26 (-54.39%)
Mutual labels:  jetpack, jetpack-compose
CloudBook
👨🏻‍💻 An ordinary person’s technical cloud notes, share the world and record life.
Stars: ✭ 38 (-33.33%)
Mutual labels:  jetpack, jetpack-compose
Compose-Settings
Android #JetpackCompose Settings library
Stars: ✭ 188 (+229.82%)
Mutual labels:  jetpack, jetpack-compose

SSJetpackComposeSwipeableView

SSJetpackComposeSwipeableView is a small library which provides support for the swipeable views. You can use this in your lazyColumns or can add a simple view which contains swipe to edit/delete functionality.

Kotlin Version Platform API

Features

  • Simple and easy to use.
  • Customize according to your needs.
  • Use wherever you want.
  • Get proper swipe callback events.

🎬 Preview

Swipe Left Swipe Right Swipe Left + Right

Installation

  • Add it in your root build.gradle at the end of repositories:

     allprojects {
     	repositories {
     		...
     		maven { url 'https://jitpack.io' }
     	}
     }
  • Add the dependency in your app's build.gradle file

     dependencies {
            implementation 'com.github.SimformSolutionsPvtLtd:SSJetpackComposeSwipeableView:1.0.1'
     }

How to Use and Customization

  1. Wherever you want to add swipeable view
    SwipeAbleItemView(
            // Triplet(Icon, TintColor, Id) Pass the icon with the tint color which you want to display in left side view, Id will be used to identify onClick Events.
            leftViewIcons = arrayListOf(Pair(Icons.Filled.Edit, "btnEditLeft"), Pair(Icons.Filled.Delete, "btnDeleteLeft")),
            // Triplet(Icon, TintColor, Id) Pass the icon with the tint color which you want to display in right side view, Id will be used to identify onClick Events.
            rightViewIcons = arrayListOf(Pair(Icons.Filled.Edit, "btnEditRight")),
            // Position of the item normally required only when used with lazyColumns to identify the index of the item.
            position = 0,
            // Swipe direction it can be Left or Right or Both (Left + Right).
            swipeDirection = swipeDirection ?: SwipeDirection.BOTH,
            // Perform any action when swipeable view is clicked. It provides the position(Index of the item) as well as id to identify which item clicked incase of multiple items.
            onClick = { // Pair(Position, Id)
                Toast.makeText(context, "${it.second} clicked. Position :- ${it.first}", Toast.LENGTH_SHORT)
                    .show()
            },
            // Width for the left side of the view which will be shown when swiped.
            leftViewWidth = 70.dp,
            // Width for the right side of the view which will be shown when swiped.
            rightViewWidth = 70.dp,
            // Height for the swipeable view.
            height = 60.dp,
            // Background color for left view.
            leftViewBackgroundColor = Primary,
            // Background color for right view.
            rightViewBackgroundColor = Primary,
            // Corner radius for swipeable view.
            cornerRadius = 4.dp,
            // Space between left swipeable view and your main content view.
            leftSpace = 10.dp,
            // Space between right swipeable view and your main content view.
            rightSpace = 10.dp,
            // fractionalThreshold for the swipe
            fractionalThreshold = 0.3f
        ) {
           // Your main view comes here.
        }

All Attributes


Attribute Description Default
leftViewIcons Triplet(Icon, TintColor, Id) Pass the icon with the tint color which you want to display in left side view, Id will be used to identify onClick Events. None
rightViewIcons Triplet(Icon, TintColor, Id) Pass the icon with the tint color which you want to display in right side view, Id will be used to identify onClick Events. None
position Position of the item normally required only when used with lazyColumns to identify the index of the item. 0
swipeDirection Swipe direction it can be Left or Right or Both (Left + Right). None
onClick Perform any action when swipeable view is clicked. It provides a Pair(Position, Id) where the position is index of the item and id to identify which item clicked incase of multiple items. None
leftViewWidth Width for the left side of the view which will be shown when swiped. 70.dp
rightViewWidth Width for the right side of the view which will be shown when swiped. 70.dp
height Height for the swipeable view. 70.dp
cornerRadius Corner radius to be applied to the button. 0.dp
leftSpace Space between left swipeable view and your main content view. 0.dp
rightSpace Space between right swipeable view and your main content view. 0.dp
fractionalThreshold It is used to resolve the elevation for this button in different. 0.3f
content Add your actual view here. none

Our JetPackCompose Sample

SSComposeCookBook : A Collection of major Jetpack compose UI components which are commonly used.

Our JetPackCompose Libraries

SSJetPackComposeProgressButton : SSJetPackComposeProgressButton is an elegant button with a different loading animations which makes your app attractive.

Find this library useful? ❤️

Support it by joining stargazers for this repository.

How to Contribute🤝

Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! 💪 Check out our Contributing Guide for ideas on contributing.

Bugs and Feedback

For bugs, feature requests, and discussion please use GitHub Issues.

Awesome Mobile Libraries

LICENSE

This project is licensed under the MIT License - see the LICENSE file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].