For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.
| public static class HideExtraOnScroll extends RecyclerView.OnScrollListener{ | |
| final static Interpolator ACCELERATE = new AccelerateInterpolator(); | |
| final static Interpolator DECELERATE = new DecelerateInterpolator(); | |
| WeakReference<View> mTarget; | |
| HideExtraOnScrollHelper mScrollHelper; | |
| boolean isExtraObjectsOutside; |
| <!-- You can change the parent around to whatever you normally use --> | |
| <style name="DebugColors" parent="Theme.AppCompat"> | |
| <!-- System colors --> | |
| <item name="android:colorForeground">#440000</item> | |
| <item name="android:colorForegroundInverse">#004400</item> | |
| <item name="android:colorBackground">#444400</item> | |
| <item name="android:colorBackgroundCacheHint">#440044</item> | |
| <item name="android:textColorPrimary">#FFFF00</item> |
| import android.animation.ValueAnimator; | |
| import android.graphics.ColorMatrix; | |
| import android.graphics.ColorMatrixColorFilter; | |
| import android.view.animation.AccelerateDecelerateInterpolator; | |
| import android.view.animation.Interpolator; | |
| import android.widget.ImageView; | |
| import java.lang.ref.SoftReference; | |
| public class PhotographicPrintAnimator { |
| import android.animation.ValueAnimator; | |
| import android.graphics.ColorMatrix; | |
| import android.graphics.ColorMatrixColorFilter; | |
| import android.view.animation.AccelerateDecelerateInterpolator; | |
| import android.view.animation.Interpolator; | |
| import android.widget.ImageView; | |
| import java.lang.ref.SoftReference; | |
| public class PhotographicPrintAnimator { |
| # Xcode | |
| # | |
| build/ | |
| *.pbxuser | |
| !default.pbxuser | |
| *.mode1v3 | |
| !default.mode1v3 | |
| *.mode2v3 | |
| !default.mode2v3 | |
| *.perspectivev3 |
| // Make a custom Gson instance, with a custom TypeAdapter for each wrapper object. | |
| // In this instance we only have RealmList<RealmInt> as a a wrapper for RealmList<Integer> | |
| Type token = new TypeToken<RealmList<RealmInt>>(){}.getType(); | |
| Gson gson = new GsonBuilder() | |
| .setExclusionStrategies(new ExclusionStrategy() { | |
| @Override | |
| public boolean shouldSkipField(FieldAttributes f) { | |
| return f.getDeclaringClass().equals(RealmObject.class); | |
| } |
| #!/bin/sh | |
| # License for any modification to the original (linked below): | |
| # ---------------------------------------------------------------------------- | |
| # "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 us a beer in return. | |
| # | |
| # Based on http://bit.ly/295BHLx |
The default behavior of Gradle to pick the newest version also applies if a lower version has been declared locally, but another dependency transitively pulls in a newer version. This is in contrast with Maven, where a locally declared version will always win.
For example, if your build.gradle specifies the dependency org.springframework:spring-tx:3.2.3.RELEASE, and another dependency declares 4.0.5.RELEASE as a transitive dependency, then 4.0.5.RELEASE will take precedence:
dependencies {
compile("org.springframework.data:spring-data-hadoop:2.0.0.RELEASE")
compile("org.springframework:spring-tx:3.2.3.RELEASE")
// will select org.springframework:spring-tx:4.0.5.RELEASE
If one module has a dependency on version 1.1 of library X and another module on version 2.0 of the same library, gradle will use the latest version.
To make gradle fail the build on encountering a conflict, we can do the following:
configurations.all {
resolutionStrategy {