• Stars
    star
    259
  • Rank 152,146 (Top 4 %)
  • Language
    Kotlin
  • License
    MIT License
  • Created over 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Jetpack Compose library to display a timeline view in Android. πŸ‹

JetLime ⏱️

A simple yet highly customizable library for showing a TimeLine view

Compose Compose Maven Central Github Followers Twitter Follow

Made with ❀ using Compose

Simple Animated Fancy Item Update

Implementation

In build.gradle of app module, include the following dependency

dependencies {
  implementation("io.github.pushpalroy:jetlime:1.0.3")
}

Usage

✌🏻 To start using JetLime, use the composable JetLimeView like this:

val jetLimeItemsModel = remember {
  JetLimeItemsModel(
    list = mutableStateListOf(
      JetLimeItem(
        title = "Item title",
        description = "Item description",
        jetLimeItemConfig = JetLimeItemConfig(
          itemHeight = 80.dp,
          iconType = IconType.Filled
        )
      )
    )
  )
}

JetLimeView(
  jetLimeItemsModel = jetLimeItemsModel,
  jetLimeViewConfig = JetLimeViewConfig(lineType = LineType.Solid),
  modifier = Modifier.padding(16.dp)
)

🀲🏻 Add or remove items to the list:

jetLimeItemsModel.addItem(
  JetLimeItem(
    title = "New Item",
    description = "New item description",
    jetLimeItemConfig = JetLimeItemConfig(iconAnimation = IconAnimation())
  )
)
jetLimeItemsModel.removeItem(jetLimeItemsModel.items.lastOrNull())

🀘🏻 To customize JetLimeView more play around with JetLimeViewConfig:

val jetTimeLineViewConfig = JetLimeViewConfig(
  backgroundColor = Color(0xFF747474),
  lineColor = Color(0xff00ACEE),
  lineThickness = 12F,
  lineType = LineType.Solid,
  lineStartMargin = 48.dp,
  lineEndMargin = 36.dp,
  iconSize = 26.dp,
  iconShape = CircleShape,
  iconBorderThickness = 2.dp,
  itemSpacing = 0.dp,
  showIcons = true
)

πŸ‘ŒπŸ» To customize each item of the view configure JetLimeItemConfig for each item:

val jetLimeItemConfig = JetLimeItemConfig(
  titleColor = Color(0xFF2C2C2C),
  descriptionColor = Color(0xFF3A3A3A),
  iconType = IconType.Checked,
  iconColor = Color(0xFF3F51B5),
  iconBorderColor = Color(0xFFFFFFFF),
  iconBackgroundColor = Color(0xFF44485F),
  itemHeight = 60.dp
)

😲 Custom animations can be done for each item icon using iconAnimation:

  val jetLimeItemConfig = JetLimeItemConfig(
  iconAnimation = IconAnimation(
    initialValue = 0.5f,
    targetValue = 1.5f,
    keySpecs = keyframes {
      durationMillis = 500
      0.6f at 0
      0.7f at 100
      0.8f at 200
      0.9f at 300
      1f at 500
    }
  )
)

😱 Apart from title and description you can pass any composable to JetLimeItem:

JetLimeItem(
  title = "Some Title",
  description = "Some Description"
) {
  // Pass any composable here
}

πŸ€ͺ Use custom icon of ImageVector type for each item:

iconType = IconType.Custom(Icons.Rounded.AccountCircle)

πŸ™ Got inspired by:

Timeline-View by Vipul Asri

License

MIT License

Copyright (c) 2022 Pushpal Roy

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.

More Repositories

1

GooglePlayCloned

A clone of the Google PlayStore Android app frontend.
Java
152
star
2

jetstore

Clone of the Google Playstore app using Jetpack Compose.
Kotlin
87
star
3

jetTaskBoard

A clone of Android Trello app with adaptive UI built using Jetpack compose.
Kotlin
59
star
4

jetflix

A movie exploring app by cloning the UI of Netflix android app built with Jetpack Compose.
Kotlin
53
star
5

JetTaskBoardKMP

Compose multi-platform application clone of Trello that runs on Android, iOS and Desktop.
Kotlin
50
star
6

rick_morty_flutter

A Flutter clean-architecture project that uses BLoC and GraphQL.
Dart
35
star
7

movieskmm

Jetpack Compose and SwiftUI based Kotlin Multiplatform project for exploring movies.
Kotlin
21
star
8

GooglePlayModified

Java
19
star
9

ComposeOtpVerify

Custom-built Android OTP Input Field in Jetpack Compose and integration with Google's SMS Retriever API.
Kotlin
16
star
10

BakingApp

Android Baking App that will allow a user to select a recipe and see video-guided steps for how to complete it.
Java
6
star
11

flick

Android app to discover the most popular movies playing
Java
5
star
12

popularmovies-stage1

An app to allow users to discover the most popular movies playing.
Java
3
star
13

AndroidArduinoCommunication-Android

This project demonstrates a simple android-arduino communication using bluetooth.
Java
3
star
14

GitSurf

A client for GitHub
Kotlin
2
star
15

fabler

A blogging platform in Android where users can showcase stories, poetries, quotes and any kind of write-ups.
Java
2
star
16

ComposePerformancePlayground

Kotlin
2
star
17

JetCustomInputField

Kotlin
1
star
18

TrendHub

Android application to show trending GitHub repositories
Kotlin
1
star
19

GalwayBus

Galway Bus Kotlin Multiplatform project using Jetpack Compose and SwiftUI
Kotlin
1
star