SpotifyCompose - Spotify UI written on Jetpack Compose

Overview

Spotify Compose ( 🚧 work in progres 🚧 )

Spotify UI built with Jetpack Compose.

Try now

SpotifyCompose 👈 click to download 🚀 🚀 🚀

Preview

SpotifyCompose

🔥 🔥 🔥 Useful extensions

NavHostController.getArgs(tag: String): T? { return try { previousBackStackEntry?.arguments?.get(tag) as T? } catch (ex: Exception) { null } }">
/**
 * putting and getting args for navHostController.
 */
 fun <T : Any> NavHostController.putArgs(args: Pair<String, T>) {
        val key = args.first
        val value = args.second
        currentBackStackEntry?.arguments?.apply {
            when (value) {
                is String -> putString(key, value)
                is Int -> putInt(key, value)
                is Short -> putShort(key, value)
                is Long -> putLong(key, value)
                is Byte -> putByte(key, value)
                is ByteArray -> putByteArray(key, value)
                is Char -> putChar(key, value)
                is CharArray -> putCharArray(key, value)
                is CharSequence -> putCharSequence(key, value)
                is Float -> putFloat(key, value)
                is Bundle -> putBundle(key, value)
                // is Serializable -> putSerializable(key, value)
                is Parcelable -> putParcelable(key, value)
                else -> throw IllegalStateException("Type ${value.javaClass.canonicalName} is not supported now")
            }
        }
    }
    
inline fun <reified T : Any> NavHostController.getArgs(tag: String): T? {
    return try {
        previousBackStackEntry?.arguments?.get(tag) as T?
    } catch (ex: Exception) {
        null
    }
}
/**
 * rounding.
 */
fun Modifier.round(
        radius: Dp? = null,
        percent: Int = 0
    ): Modifier {
        return if (radius != null) {
            this.clip(RoundedCornerShape(radius))
        } else {
            this.clip(RoundedCornerShape(percent))
        }
    }
    
fun Modifier.round(
        percent: Int = 0
    ): Modifier {
        return this.clip(RoundedCornerShape(percent = percent))
    }
/**
 * change color.
 */
fun Modifier.color(
        colorHex: Int = 0
    ): Modifier {
        return this.background(Color(colorHex))
    }

fun Modifier.color(
        color: Color = Color.Transparent
    ): Modifier {
        return this.background(color)
    }
/**
 * gradient color.
 */
 enum class GradientType {
        HORIZONTAL, VERTICAL, LINEAR, RADIAL, SWEEP
    }
    
 fun Modifier.gradient(
        colors: List<Color>,
        gradientType: GradientType = GradientType.LINEAR
    ): Modifier {
        return this.background(
            brush = when (gradientType) {
                GradientType.HORIZONTAL -> {
                    Brush.horizontalGradient(colors = colors)
                }
                GradientType.VERTICAL -> {
                    Brush.verticalGradient(colors = colors)
                }
                GradientType.LINEAR -> {
                    Brush.linearGradient(colors = colors)
                }
                GradientType.RADIAL -> {
                    Brush.radialGradient(colors = colors)
                }
                GradientType.SWEEP -> {
                    Brush.sweepGradient(colors = colors)
                }
            }
        )
    }
You might also like...
A library that you can use in 4 different types toast written with Jetpack Compose
A library that you can use in 4 different types toast written with Jetpack Compose

Composable Sweet Toast A library that you can use in 4 different types(Success, Error, Warning, Info) written with Jetpack Compose. You can use this t

Dynamic Badge with customizable features as max number before displaying with +, color, shadow, border, corner radius, font properties and more written with Jetpack Compose
Dynamic Badge with customizable features as max number before displaying with +, color, shadow, border, corner radius, font properties and more written with Jetpack Compose

✏️📌 Dynamic Badge with customizable features as max number before displaying with +, color, shadow, border, corner radius, font properties and more written with Jetpack Compose. Displays numbers either in circle or rounded rectangle shape based on badge count and selected threshold to transform from circle to rounded rectangle.

An Android imageboard client with the focus on maximum performance, fully written with Jetpack Compose

This project is an experimental playground to try implementing an application entirely with Jetpack Compose without using the old Android UI framework.

Colorful Sliders written with Jetpack Compose that enliven default sliders
Colorful Sliders written with Jetpack Compose that enliven default sliders

🚀🌈 😍 Colorful Sliders written with Jetpack Compose that enliven default sliders with track and thumb dimensions, and gradient colors, borders, labels on top or at the bottom move with thumb and ColorfulIconSlider that can display emoji or any Composable as thumb

A library that you can use in 4 different types(Success, Error, Warning, Info) written with Jetpack Compose.
A library that you can use in 4 different types(Success, Error, Warning, Info) written with Jetpack Compose.

Composable Sweet Toast A library that you can use in 4 different types(Success, Error, Warning, Info) written with Jetpack Compose. You can use this t

A LibrePhotos android client written using Jetpack Compose and all the latest Android technologies
A LibrePhotos android client written using Jetpack Compose and all the latest Android technologies

UhuruPhotos. A LibrePhotos client UhuruPhotos is an Android client for LibrePhotos written using the latest Android technologies, like Jetpack Compose

FirebaseSignInWithGoogle app it's written in Kotlin and shows a simple solution for implementing Firebase Authentication with Google, using Jetpack Compose on Android.
FirebaseSignInWithGoogle app it's written in Kotlin and shows a simple solution for implementing Firebase Authentication with Google, using Jetpack Compose on Android.

FirebaseSignInWithGoogle It's an app built with Kotlin that shows how to authenticate users with Firebase using Android Architecture Components and th

It's a simple app written in Kotlin that shows a simple solution for how to save an image into Firebase Storage, save the URL in Firestore, and read it back using Jetpack Compose.
It's a simple app written in Kotlin that shows a simple solution for how to save an image into Firebase Storage, save the URL in Firestore, and read it back using Jetpack Compose.

It's a simple app written in Kotlin that shows a simple solution for how to save an image into Firebase Storage, save the URL in Firestore, and read it back using Jetpack Compose.

Jetpack Compose Boids | Flocking Insect 🐜. bird or Fish simulation using Jetpack Compose Desktop 🚀, using Canvas API 🎨
Jetpack Compose Boids | Flocking Insect 🐜. bird or Fish simulation using Jetpack Compose Desktop 🚀, using Canvas API 🎨

🐜 🐜 🐜 Compose flocking Ants(boids) 🐜 🐜 🐜 Jetpack compose Boids | Flocking Insect. bird or Fish simulation using Jetpack Compose Desktop 🚀 , usi

Comments
  • Bug in Navigation

    Bug in Navigation

    Hi , in navigation when in ui router?.goBack() this go to main screen but must 1 ui back . what to do?

    even startDestinition delete in routerImpl in goBack() and just navigateUp or popBackStack again go to Main Screen but must 1 navigateUp

    what to do ?

    thank you :)

    opened by appleader707 0
Releases(1.0)
Owner
Ivan Gospodarik
Ivan Gospodarik
Scrobble is a wip music tracking and browsing app. It uses the Lastf.fm and spotify APIs to deliver data. The whole UI is created using Jetpack compose.

Scrobble (WIP, name not final) Scrobble is a wip music tracking and browsing app. It uses the Lastf.fm API to realize music tracking and browsing and

Niklas Schnettler 55 Oct 31, 2022
Spotify Demo Desktop app using Jetpack compose

Compose Spotify Desktop Declarative UI A Spotify demo app for desktop using Jetpack Compose UI toolkit Demo Home Search & Detail Jetpack Compose Jetpa

Gurupreet Singh 619 Dec 31, 2022
very unstable UNOFFICIAL Spotify client for Android built on librespot-java + Compose

Jetispot not so broken UNOFFICIAL Spotify client for Android Note that this client will NEVER offer any kind of a downloader/offline caching. Don't as

iTaysonLab 192 Jan 2, 2023
Advanced coroutine-based Spotify API wrapper for Kotlin.

Kotify Advanced coroutine-based Spotify API wrapper for Kotlin. Contens Todo Getting started TODO Rate limits handling. Kotify Http Proxy. Better docu

Juan Luis Caro 4 Jan 2, 2023
Pokedex Compose is an independent re-write of a demo application by the name of Pokedex, but written in jetpack compose.

Pokedex Compose Pokedex Compose is an independent re-write of a similar project by the name of Pokedex. I am recreating the UI but I am doing it using

Jose Patino 4 May 1, 2022
A simple 'Slide to Unlock' Material widget for Android, written in Jetpack Compose

SlideTodo A simple 'Slide to Unlock' Material widget for Android, written in Jetpack Compose you can find source code here Getting Started allprojects

Nthily 7 Aug 8, 2022
A Sudoku game for Android & Desktop written with Jetpack Compose Multiplatform

?? Compose Arcade A sample Kotlin Multiplatform Compose Sudoku app for Android & Desktop. Most code is shared between Android & Desktop using Kotlin M

Aaron Oertel 42 Dec 30, 2022
Android browser written by jetpack compose

TS Browser Top secret Browser! Download Features ■ Secret Mode Secret mode is a unique mode in TS browser. The secret mode is designed for browsing se

hinnka 28 Dec 31, 2022
Yet another ToDo app, but the UI completely written in Jetpack Compose!

Yet another ToDo app, but the UI completely written in Jetpack Compose!

Wisnu Kurniawan 134 Dec 31, 2022
Morph is an Android library, written in Kotlin, built to work together with Jetpack Compose.

Morph Morph is an Android library, written in Kotlin, built to work together with Jetpack Compose. It allows you to transition any view to another vie

Menno Vogel 12 Jul 10, 2022