Skip to content

Instantly share code, notes, and snippets.

View dmytrodanylyk's full-sized avatar

Dmytro Danylyk dmytrodanylyk

View GitHub Profile
@dmytrodanylyk
dmytrodanylyk / description.md
Last active June 20, 2022 15:00
Where this dependency comes from?

Did you ever have android build failed​ issue because of dependency resolution?

… or you were curious where all these old rxjava dependencies come from?

You can pretty easy track the module causing issues via following gradle command.

gradlew :root-module:dependencyInsight \
--configuration debugRuntimeClasspath \ // or debugCompileClasspath
--dependency io.reactivex:rxjava:1.1.0 > dependencies.txt // saves result to 'dependencies.txt' file
@dmytrodanylyk
dmytrodanylyk / res_color_btn_flat_selector.xml
Last active March 4, 2023 07:52
Material Flat Button Style
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false"
android:color="@color/flat_disabled_text"/>
<item android:color="@color/flat_normal_text"/>
</selector>
@dmytrodanylyk
dmytrodanylyk / ErrorLabelLayout.java
Created January 21, 2015 15:35
Android Error Label
public class ErrorLabelLayout extends LinearLayout implements ViewGroup.OnHierarchyChangeListener {
private static final int ERROR_LABEL_TEXT_SIZE = 12;
private static final int ERROR_LABEL_PADDING = 4;
private TextView mErrorLabel;
private Drawable mDrawable;
private int mErrorColor;
public ErrorLabelLayout(Context context) {
@chrisbanes
chrisbanes / CollapsingTitleLayout.java
Last active March 26, 2023 11:58
CollapsingTitleLayout
/*
* Copyright 2014 Chris Banes
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
public class CircularProgressDrawable extends Drawable
implements Animatable {
private static final Interpolator ANGLE_INTERPOLATOR = new LinearInterpolator();
private static final Interpolator SWEEP_INTERPOLATOR = new DecelerateInterpolator();
private static final int ANGLE_ANIMATOR_DURATION = 2000;
private static final int SWEEP_ANIMATOR_DURATION = 600;
private static final int MIN_SWEEP_ANGLE = 30;
private final RectF fBounds = new RectF();
@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active March 15, 2024 06:39
FloatLabelLayout
/*
* Copyright 2014 Chris Banes
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software