Skip to content

Commit

Permalink
Merge pull request #4 from Yalantis/feature/fix_cancel_button
Browse files Browse the repository at this point in the history
Feature/fix cancel button
  • Loading branch information
igalata authored Feb 24, 2017
2 parents 8789f68 + a5f64a2 commit ec9fbeb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions filter/src/main/java/com/yalantis/filter/widget/FilterItem.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ package com.yalantis.filter.widget

import android.content.Context
import android.content.res.ColorStateList
import android.graphics.Canvas
import android.graphics.Typeface
import android.graphics.drawable.GradientDrawable
import android.support.annotation.ColorInt
import android.support.annotation.ColorRes
import android.support.annotation.DrawableRes
import android.support.v4.content.ContextCompat
import android.support.v4.content.res.ResourcesCompat
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.MotionEvent
Expand Down Expand Up @@ -95,13 +97,12 @@ class FilterItem : FrameLayout, Serializable {
}
}
buttonCancel.supportBackgroundTintList = ColorStateList.valueOf(getColor(cancelIconTint))
buttonCancel.setBackgroundDrawable(resources.getDrawable(cancelIcon))
isIncreased = true
}

override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec)

buttonCancel.setBackgroundResource(cancelIcon)
if (fullSize == 0) {
fullSize = measuredWidth
}
Expand Down

0 comments on commit ec9fbeb

Please sign in to comment.