Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Rodrigo rodrigosimoesrosa

I may be slow to respond.
Block or report user

Report or block rodrigosimoesrosa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rodrigosimoesrosa /
Created May 22, 2019 — forked from lopspower/
Hexadecimal color code for transparency

Hexadecimal color code for transparency


How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

View Float.kt
import java.math.RoundingMode
import kotlin.math.round
* Created by rodrigosimoesrosa.
const val DIGITS = 1
fun Float.round(decimals: Int = DIGITS): Float {
var multiplier = 1.0f
View FixAppBarLayoutBehavior.kt
* Copyright (C) 2018 The Android Open Source Project
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
rodrigosimoesrosa / circle_drawable_shadow.xml
Last active Jul 19, 2018
Shadow for circle drawable Android.
View circle_drawable_shadow.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="" >
<!-- Shadow -->
<shape android:shape="oval">
You can’t perform that action at this time.