Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
| package com.vishal2376.animations.ui.theme | |
| import androidx.compose.animation.animateColorAsState | |
| import androidx.compose.animation.core.EaseInOut | |
| import androidx.compose.animation.core.animateFloatAsState | |
| import androidx.compose.animation.core.tween | |
| import androidx.compose.foundation.background | |
| import androidx.compose.foundation.clickable | |
| import androidx.compose.foundation.layout.Arrangement | |
| import androidx.compose.foundation.layout.Box |
| import androidx.compose.ui.draw.drawWithCache | |
| import androidx.compose.ui.geometry.CornerRadius | |
| import androidx.compose.ui.geometry.Offset | |
| import androidx.compose.ui.geometry.Rect | |
| import androidx.compose.ui.geometry.Size | |
| import androidx.compose.ui.graphics.BlendMode | |
| import androidx.compose.ui.graphics.Brush | |
| import androidx.compose.ui.graphics.Color | |
| import androidx.compose.ui.graphics.ColorFilter | |
| import androidx.compose.ui.graphics.ImageBitmap |
| /* | |
| * ---------------------------------------------------------------------------- | |
| * "THE BEER-WARE LICENSE" (Revision 42): | |
| * Sebastiano Poggi wrote this file. As long as you retain this notice you | |
| * can do whatever you want with this stuff. If we meet some day, and you think | |
| * this stuff is worth it, you can buy me a beer in return. Seb | |
| * ---------------------------------------------------------------------------- | |
| */ | |
| package dev.sebastiano.bundel |
| ## Seb's .gitignore template | |
| # You can find the most up-to-date version at https://go.sebastiano.dev/gitignore | |
| # Partly based on templates by https://plugins.jetbrains.com/plugin/7495--ignore | |
| # Released under a CC-0 License https://creativecommons.org/share-your-work/public-domain/cc0/ | |
| ### Windows template | |
| # Windows thumbnail cache files | |
| Thumbs.db | |
| Thumbs.db:encryptable | |
| ehthumbs.db |
| private val PARTICLE_COLOR = Color.White | |
| private val LINE_COLOR = Color.White | |
| private const val PARTICLE_QUANTITY = 100 | |
| private const val DEFAULT_SPEED = 2 | |
| private const val VARIANT_SPEED = 1 | |
| private const val DEFAULT_RADIUS = 4 | |
| private const val VARIANT_RADIUS = 2 | |
| private const val LINK_RADIUS = 200 | |
| // TODO: 30/09/2020 These should be measured but are only used to calculate | |
| // the initial position |
| import android.content.Context | |
| import android.content.res.ColorStateList | |
| import android.content.res.TypedArray | |
| import android.graphics.drawable.Drawable | |
| import androidx.annotation.StyleableRes | |
| import androidx.appcompat.content.res.AppCompatResources | |
| /** | |
| * Utility methods for extracting [ColorStateList]s and [Drawable]s from a [TypedArray]. |
| import android.content.Context | |
| import android.graphics.Canvas | |
| import android.graphics.Color | |
| import android.graphics.Paint | |
| import android.util.AttributeSet | |
| import android.view.View | |
| import kotlin.math.cos | |
| import kotlin.math.sin | |
| import kotlin.math.sqrt |
| <android.support.v4.widget.SwipeRefreshLayout | |
| android:id="@+id/refreshLayout" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent"> | |
| <android.support.v4.widget.NestedScrollView | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent"> | |
| <LinearLayout |