Skip to content

Instantly share code, notes, and snippets.

View randroid88's full-sized avatar

Randy Lutcavich randroid88

View GitHub Profile
@randroid88
randroid88 / Barrier ConstraintLayout Compose Android
Last active May 28, 2024 15:10
Barrier example showing how to use it to align composables in a ConstraintLayout for Android.
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.layoutId
import androidx.compose.ui.unit.dp
import androidx.constraintlayout.compose.ConstraintLayout
@randroid88
randroid88 / Guideline ConstraintLayout Compose Android
Last active May 28, 2024 15:48
Visual guidelines example for Android Jetpack Compose ConstraintLayout
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.layoutId
import androidx.compose.ui.unit.dp

Keybase proof

I hereby claim:

  • I am randroid88 on github.
  • I am randroid (https://keybase.io/randroid) on keybase.
  • I have a public key ASC1FVkIM6xh8KsD-_m-5lYU9mJs_hvXvYvs4TuiCE8LFwo

To claim this, I am signing this object:

import junit.framework.Assert.assertEquals
import org.junit.Test
class MovieTicketPurchaseAcceptanceTest {
private var purchase = MovieTicketPurchase()
private var receipt: Double = 0.0
@Test
fun `0 tickets`() {
receipt = purchase.receipt()
@randroid88
randroid88 / movie.md
Last active June 16, 2020 21:16 — forked from farshadtx/movie.md

Movie Ticket Kata

What Are We Building?

Write a program that calculates purchase price for movie tickets using kotlin. It should not be a full-blown mobile app; it can be a simple class or collection of functions invokable by your test suite. We'll provide you with some requirements, test cases, and even a sample interface - all you have to do is give us some software.

Base Admission Rate

The Base Admission Rate covers movies to be viewed on a regular weekday (see "Special Movie Day" below), in 2D, with a length of <= 120 minutes, viewed from the main seating area (there is also a balcony seating area, which is much fancier).