Skip to content

Instantly share code, notes, and snippets.

View warting's full-sized avatar

Stefan Wärting warting

View GitHub Profile
@warting
warting / MaterialColors.kt
Created March 11, 2021 09:24
Material design color palette with compose colors written in kotlin
package se.warting.playground.ui.theme
import androidx.compose.ui.graphics.Color
/**
* Material design color palette with compose colors written in kotlin
*
* Taken from https://material.io/design/color/the-color-system.html
*
* These color palettes, originally created by Material Design in 2014, are comprised of colors
@GBouerat
GBouerat / CursorLiveData.java
Last active March 7, 2020 09:00
First try at LiveData with Cursor and ContentProvider to keep using CursorAdapter
import android.app.Application;
import android.arch.lifecycle.LiveData;
import android.content.Context;
import android.database.ContentObserver;
import android.database.Cursor;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;