• Stars
    star
    350
  • Rank 121,229 (Top 3 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated over 4 years ago

Reviews

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

Repository Details

A playground for elevation on Android

Uplift GitHub release GitHub license

Uplift

Uplift showcase      About tinted shadows

Unbeknownst to most, elevation shadows are actually not completely inflexible. Besides setting the elevation height itself, you can tweak the shadows in clever ways to obtain subtler shadows, or simply some specific effect. This can be seen in action in the Squanchy schedule screen, which uses a custom OutlineProvider to cast shadows for the cards that look more like diffuse shadows (although they're very much still the area shadow that the Material guidelines specify, there is no custom drawing code there).

For more details, you can refer to the accompanying blogpost, and to the follow up posts for Android P: part 1 and part 2.

Tinting shadows (Android P+)

Starting with Android P (API 28) you can specify the colour that elevation shadows take on. You can individually tint the area and the spot shadows β€” although you probably want the same colour for both, most of the time. Remember, though, that shadow colours' alphas are premultiplied by a factor that is defined by the ambientShadowAlpha and spotShadowAlpha theme attributes, which are set by default to 0.039 for ambient shadows and 0.19 for spot shadows.

If you want to learn more about it, and learn how to bypass these limitations, you can refer to the dedicated blog posts, starting with the first part.

More on Uplift

You can test Uplift by downloading it from the Play Store or get the apk from the Releases tab.

Get it on Google Play

Licence

See the LICENSE file. tl;dr it's Apache 2.0.

The app uses Alessandro Crugnola's android-target-tooltip library for the onboarding, which is licensed under the MIT license.

More Repositories

1

deep-clean

When Gradle or the IDE let you down, just --nuke all them caches
Kotlin
928
star
2

giffify

Giffify - easily create optimised GIFs from a video
Python
65
star
3

launcher-icon

A simple demo project that showcases how to set up Android launcher icons
Java
37
star
4

advanced-kotlin-workshop

Code for my "Practical Advanced Kotlin in Practice" workshop
Kotlin
33
star
5

smartlock-demo

A simple but complete demo of how to use SmartLock for Passwords -- see https://developers.google.com/identity/smartlock-passwords/android/
Java
32
star
6

ide-showcase

A playground to showcase cool IDE features.
Kotlin
14
star
7

pushbeat

Sample GCP AppEngine Ktor REST API and corresponding Android app
Kotlin
10
star
8

sandbox-demo

Compose for Desktop falling sand simulator
Kotlin
10
star
9

ktor-gradle-kts-template

A template repository for Kotlin projects with Gradle KTS support and advanced dependencies configuration.
Kotlin
6
star
10

custom-theme-playground

If an owl falls in a forest but there's nobody around, do you still lose your streak?
Kotlin
4
star
11

share-callback-demo

Demo of how to use standard system dialogs to share content and get a callback (e.g., for tracking)
Kotlin
3
star
12

if-this-then-that

Given IFTTT is now useless, this replaces it.
2
star
13

framer

Grabs a screenshot from a connected Android device and frames it, faster than Android Studio
Java
2
star
14

volley

A clone of Google's own Volley library
Java
1
star
15

compose-desktop-fonts-enumerator

An experiment on how to enumerate System fonts on Compose for Desktop
Kotlin
1
star
16

code-merge

A tool to simplify merging code changes from a separate codebase
Kotlin
1
star