Skip to content

Commit

Permalink
Some minor code cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbutcher committed Aug 16, 2016
1 parent 11460f8 commit d4a7165
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public StartAnimatable(Context context, AttributeSet attrs) {
Drawable drawable = a.getDrawable(R.styleable.StartAnimatable_android_src);
a.recycle();
if (drawable instanceof Animatable) {
animatable = ((Animatable) drawable);
animatable = (Animatable) drawable;
} else {
throw new IllegalArgumentException("Non-Animatable resource provided.");
}
Expand All @@ -76,7 +76,7 @@ public Animator createAnimator(ViewGroup sceneRoot,
if (animatable == null || endValues == null
|| !(endValues.view instanceof ImageView)) return null;

ImageView iv = ((ImageView) endValues.view);
ImageView iv = (ImageView) endValues.view;
iv.setImageDrawable((Drawable) animatable);

// need to return a non-null Animator even though we just want to listen for the start
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/io/plaidapp/util/ColorUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ public static boolean isDark(@ColorInt int color) {
lightnessMultiplier = 1f - lightnessMultiplier;
}


hsl[2] = MathUtils.constrain(0f, 1f, hsl[2] * lightnessMultiplier);
return android.support.v4.graphics.ColorUtils.HSLToColor(hsl);
}
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
android:id="@+id/search_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:transitionName="foo"
android:background="@color/background_dark" />

<SearchView
Expand Down

0 comments on commit d4a7165

Please sign in to comment.