# ComposeWidgets **Repository Path**: WhatINeed/ComposeWidgets ## Basic Information - **Project Name**: ComposeWidgets - **Description**: ComposeWidgets - **Primary Language**: Unknown - **License**: OFL-1.1 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-09-19 - **Last Updated**: 2024-11-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # sample is a sample snack ordering app built with [Jetpack Compose][compose]. To try out this sample app, you need to use [Android Studio Arctic Fox](https://developer.android.com/studio). You can clone this repository or import the project from Android Studio following the steps [here](https://developer.android.com/jetpack/compose/setup#sample). This sample showcases: * How to implement a custom design system * Custom layout * Animation ### Status: 🚧 In progress 🚧 Jetsnack is still under development and some screens are not yet implemented. ## Features ### Custom Design System Jetsnack's major feature is demonstrating how to implement a custom design system. Jetsnack has a bespoke color system and does not use [Material color theming](https://material.io/design/color/the-color-system.html). This is implemented by: * [`JetsnackColorPalette`](app/src/main/java/com/example/planta/ui/theme/Theme.kt#L114) a class modelling the desired color system. * [`JetsnackColorAmbient`](app/src/main/java/com/example/planta/ui/theme/Theme.kt#L231) an [ambient](https://developer.android.com/reference/kotlin/androidx/compose/Ambient) holding the current color set. * [`ProvideJetsnackColors`](app/src/main/java/com/example/planta/ui/theme/Theme.kt#L222) a composable function [providing](https://developer.android.com/reference/kotlin/androidx/compose/package-summary#Providers(androidx.compose.ProvidedValue,%20kotlin.Function0)) a `JetsnackColorPalette` * [`JetsnackTheme` object](app/src/main/java/com/example/planta/ui/theme/Theme.kt#L104), providing convenient access to the current theme colors. * [`JetsnackTheme` composable](app/src/main/java/com/example/planta/ui/theme/Theme.kt#L81), the app's theme. Note that while Jetsnack implements a custom color system, it still uses Material's shape and type theming. Jetsnack wraps Material components, customizing them to use its color system. See the [components package](app/src/main/java/com/example/planta/ui/components) e.g. [`JetsnackButton`](app/src/main/java/com/example/planta/ui/components/Button.kt). Jetsnack makes heavy use of gradients, see [`Gradient`](app/src/main/java/com/example/planta/ui/components/Gradient.kt) for a number of helpful [`Modifier`](https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier)s. ### Custom Layout Jetsnack utilizes custom [`Layout`](https://developer.android.com/reference/kotlin/androidx/compose/ui/package-summary#layout_1)s to achieve its design. See: * [`CollapsingImageLayout`](app/src/main/java/com/example/planta/ui/snackdetail/SnackDetail.kt#L274) shown above. * [`SearchCategory`](app/src/main/java/com/example/planta/ui/home/search/Categories.kt#L97) custom positioning of an image and text items. * [`JetsnackBottomNavLayout`](app/src/main/java/com/example/planta/ui/home/Home.kt#L170) a custom Bottom Navigation implementation which animates the width of selected/unselected items. ## Data Domain types are modelled in the [model package](app/src/main/java/com/example/planta/model), each containing static sample data exposed using fake `Repo`s objects. Imagery is sourced from [Unsplash](https://unsplash.com/) and loaded using [coil-accompanist][coil-accompanist]. ## License ``` Copyright 2020 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ``` [compose]: https://developer.android.com/jetpack/compose [coil-accompanist]: https://google.github.io/accompanist/coil/