All Projects → skydoves → Orchestra

skydoves / Orchestra

Licence: apache-2.0
🎺 Orchestra is a collection of Android custom view compatible libraries for Jetpack Compose.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Orchestra

React Native Loading Spinner Overlay
💈 React Native loading spinner overlay
Stars: ✭ 1,369 (+884.89%)
Mutual labels:  spinner
Elixir cli spinners
Spinnig Animations for Command Line Applications
Stars: ✭ 117 (-15.83%)
Mutual labels:  spinner
Sliders Swiftui
Collection of unique fully customizable SwiftUI sliders, joysticks, trackpads and more!
Stars: ✭ 132 (-5.04%)
Mutual labels:  colorpicker
Materialspinner
Implementation of a Material Spinner for Android with TextInputLayout functionalities
Stars: ✭ 107 (-23.02%)
Mutual labels:  spinner
Vue Spinner Component
Vue Spinner Component
Stars: ✭ 114 (-17.99%)
Mutual labels:  spinner
Py Spinners
🔄 More than 60 spinners for terminal, python wrapper for amazing node library cli-spinners
Stars: ✭ 124 (-10.79%)
Mutual labels:  spinner
Ng Spin Kit
SpinKit (http://tobiasahlin.com/spinkit/) spinners for Angular
Stars: ✭ 90 (-35.25%)
Mutual labels:  spinner
Vue Spinner
vue spinners
Stars: ✭ 1,725 (+1141.01%)
Mutual labels:  spinner
Swiftloader
A simple and beautiful activity indicator written in Swift
Stars: ✭ 116 (-16.55%)
Mutual labels:  spinner
Ember Cli Pace
Pace.js load progress bar for Ember apps, incl. Flash-like initial script lazy loading
Stars: ✭ 128 (-7.91%)
Mutual labels:  spinner
Smartmaterialspinner
The powerful android spinner library for your application
Stars: ✭ 108 (-22.3%)
Mutual labels:  spinner
Multi Colorpicker
Android multi colorpicker for getting colors from any images by tapping on the desired color.
Stars: ✭ 115 (-17.27%)
Mutual labels:  colorpicker
Vue Loaders
Vue + loaders.css
Stars: ✭ 127 (-8.63%)
Mutual labels:  spinner
Spinner
Go (golang) package with 90 configurable terminal spinner/progress indicators.
Stars: ✭ 1,637 (+1077.7%)
Mutual labels:  spinner
React Native Login Template
Simple login template for React Native.
Stars: ✭ 133 (-4.32%)
Mutual labels:  colorpicker
Bootstrap Colorpicker
Bootstrap Colorpicker is a modular color picker plugin for Bootstrap.
Stars: ✭ 1,351 (+871.94%)
Mutual labels:  colorpicker
Easyadapter
Recyclerview adapter library- Create adapter in just 3 lines of code
Stars: ✭ 122 (-12.23%)
Mutual labels:  spinner
Instagramactivityindicator
Activity Indicator similar to Instagram's.
Stars: ✭ 138 (-0.72%)
Mutual labels:  spinner
Ng Block Ui
Block UI Loader/Spinner for Angular
Stars: ✭ 135 (-2.88%)
Mutual labels:  spinner
Jtmaterialspinner
An iOS material design spinner view
Stars: ✭ 127 (-8.63%)
Mutual labels:  spinner

Orchestra

License API Profile

🎺 Jetpack Compose compatible libraries using Balloon, ColorPickerView, PowerSpinner.

Balloon

Maven Central

Add below codes to your root build.gradle file (not your module build.gradle file).

allprojects {
    repositories {
        mavenCentral()
    }
}

And add a dependency code to your module's build.gradle file.

dependencies {
    implementation "com.github.skydoves:orchestra-balloon:1.0.4"
}

Usage

BalloonAnchor composable can be used in ConstraintLayout and it receives a constraint reference. In the below, BalloonAnchor references image composable. When clicked the image composable, balloon popup will be shown.

ConstraintLayout {
  val (image, title, content, message) = createRefs()

  // image, title, content, message //
  
  BalloonAnchor(
    reference = image,
    modifier = Modifier.aspectRatio(0.8f),
    balloon = BalloonUtils.getTitleBalloon(
      context = context,
      title = poster.name,
      lifecycle = lifecycleOwner
    ),
    onAnchorClick = { balloon, anchor -> balloon.show(anchor) }
  )

Or we can create a BalloonAnchor composable using Balloon.Factory.

BalloonAnchor(
  reference = image,
  modifier = Modifier.aspectRatio(0.8f),
  factory = MyBalloonFactory::class,
  onAnchorClick = { balloon, anchor -> balloon.show(anchor) },
  onBalloonClick = { },
  onBalloonDismiss = { },
  onBalloonInitialized = { content -> },
  onBalloonOutsideTouch = { content, event -> }
)

ColorPicker

Maven Central
And add a dependency code to your module's build.gradle file.

dependencies {
    implementation "com.github.skydoves:orchestra-colorpicker:$version"
}

Usage

ColorPicker composable implements a color picker with AlphaSlideBar and BrightnessSlideBar. We can create an alpha sidebar and brightness sidebar for changing saturation and lightness by tapping on the desired color. They should be used in children inner composable in ColorPicker, and they receive a colorPickerView as a parameter.

val (selectedColor, setSelectedColor) 
      = remember { mutableStateOf(ColorEnvelope(0)) }
ColorPicker(
    modifier = Modifier.fillMaxWidth().height(400.dp),
    onColorListener = { envelope, _ ->
      setSelectedColor(envelope)
    },
    initialColor = purple500,
    children = { colorPickerView ->
      Column(modifier = Modifier.padding(top = 32.dp)) {
        Box(modifier = Modifier.padding(vertical = 6.dp)) {
          AlphaSlideBar(
            modifier = Modifier.fillMaxWidth().height(30.dp)
              .clip(RoundedCornerShape(4.dp)),
            colorPickerView = colorPickerView
          )
        }
        Box(modifier = Modifier.padding(vertical = 6.dp)) {
          BrightnessSlideBar(
            modifier = Modifier.fillMaxWidth().height(30.dp)
              .clip(RoundedCornerShape(4.dp)),
            colorPickerView = colorPickerView
          )
        }
      }
    }
  )

AlphaTileBox

In a normal View, it can not represent ARGB colors accurately. Because a color will be mixed with the parent's background-color. For resolving it we can use AlphaTileBox composable. AlphaTileBox composable reflects ARGB colors.

AlphaTileBox(
  modifier = modifier.constrainAs(square) {
    bottom.linkTo(parent.bottom)
    centerHorizontallyTo(parent)
  }.size(64.dp).clip(RoundedCornerShape(4.dp))
) {
  it.setBackgroundColor(selectedColor.color)
}

Spinner

Maven Central
And add a dependency code to your module's build.gradle file.

dependencies {
    implementation "com.github.skydoves:orchestra-spinner:$version"
}

Usage

Spinner composable implements a lightweight dropdown popup spinner. Here is an example for creating a spinner using a sting array resource. We should use the String generic type for creating a spinner when we us a string array resource.

 val (selectedItem, setSelectedItem) 
      = remember { mutableStateOf("Choose a question") }
 Spinner<String>(
      text = selectedItem0,
      modifier = Modifier.fillMaxWidth().padding(16.dp)
        .background(blue200)
        .align(Alignment.CenterHorizontally),
       itemListRes = R.array.list_spinner,
      color = Color.White,
      style = MaterialTheme.typography.body2,
      textAlign = TextAlign.Center,
      showDivider = true,
      dividerColor = white87,
      overflow = TextOverflow.Ellipsis,
      maxLines = 1,
      spinnerPadding = 16.dp,
      spinnerBackgroundColor = MaterialTheme.colors.onBackground,
      onSpinnerItemSelected = { index, item ->
        setSelectedItem(item)
      }
    )

Here is an another example using a List for creating a spinner. In this case, we don't need to decide a generic type of Spinner.

 val coffeeList = remember { listOf("Americano", "Cold Brew", "Espresso", "Latte") }
 val (selectedItem1, setSelectedItem1) = remember { mutableStateOf("Choose your coffee") }
 Spinner(
      text = selectedItem1,
      modifier = Modifier.fillMaxWidth().padding(16.dp)
        .background(amber700)
        .align(Alignment.CenterHorizontally),
      itemList = coffeeList,
      color = Color.White,
      style = MaterialTheme.typography.body2,
      textAlign = TextAlign.Center,
      dividerColor = white87,
      overflow = TextOverflow.Ellipsis,
      maxLines = 1,
      spinnerPadding = 16.dp,
      spinnerBackgroundColor = MaterialTheme.colors.onBackground,
      onSpinnerItemSelected = { index, item ->
        setSelectedItem1(item)
      }
    )

Find this repository useful? ❤️

Support it by joining stargazers for this repository. ⭐️
And follow me for my next creations! 🤩

License

Designed and developed by 2020 skydoves (Jaewoong Eum)

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

   http://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.
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].