Skip to content

Instantly share code, notes, and snippets.

View arcadefire's full-sized avatar
🎯
Focusing

Angelo Marchesin arcadefire

🎯
Focusing
View GitHub Profile
@arcadefire
arcadefire / bottomsheet.kt
Created September 12, 2021 12:50
Bottom sheet
enum class States {
EXPANDED,
COLLAPSED
}
@ExperimentalMaterialApi
@Composable
fun FullHeightBottomSheet(
header: @Composable () -> Unit,
body: @Composable () -> Unit
@arcadefire
arcadefire / FullScreenNotification.kt
Last active August 3, 2021 13:35
FullScreenNotification redone with Compose
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 10:11
Build times plugin JSON format
{
"success": true,
"count": 663,
"measurements": [
{
"timestamp": 1558000984082,
"order": 0,
"task": ":clean",
"success": true,
"did_work": true,
@arcadefire
arcadefire / RecyclerViewExtension.kt
Last active April 20, 2023 10:14
Add addOnItemClickListener easily to a RecyclerView using Kotlin
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?) {