Skip to content

Instantly share code, notes, and snippets.

Avatar

Angelo Marchesin arcadefire

View GitHub Profile
View bottomsheet.kt
enum class States {
EXPANDED,
COLLAPSED
}
@ExperimentalMaterialApi
@Composable
fun FullHeightBottomSheet(
header: @Composable () -> Unit,
body: @Composable () -> Unit
@arcadefire
arcadefire / FullScreenNotification.kt
Last active Aug 3, 2021
FullScreenNotification redone with Compose
View FullScreenNotification.kt
package com.glovoapp.components
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.defaultMinSize
@arcadefire
arcadefire / build-times-json-format.json
Created May 16, 2019
Build times plugin JSON format
View build-times-json-format.json
{
"success": true,
"count": 663,
"measurements": [
{
"timestamp": 1558000984082,
"order": 0,
"task": ":clean",
"success": true,
"did_work": true,
@arcadefire
arcadefire / RecyclerViewExtension.kt
Last active Dec 8, 2020
Add addOnItemClickListener easily to a RecyclerView using Kotlin
View RecyclerViewExtension.kt
import android.support.v7.widget.RecyclerView
import android.view.View
interface OnItemClickListener {
fun onItemClicked(position: Int, view: View)
}
fun RecyclerView.addOnItemClickListener(onClickListener: OnItemClickListener) {
this.addOnChildAttachStateChangeListener(object: RecyclerView.OnChildAttachStateChangeListener {
override fun onChildViewDetachedFromWindow(view: View?) {