Commit da2386e7 authored by Yusuke Iwaki's avatar Yusuke Iwaki

extra item background

parent 8e15639f
package chat.rocket.android.widget.layouthelper; package chat.rocket.android.widget.layouthelper;
import android.graphics.drawable.Drawable;
import android.support.annotation.ColorRes; import android.support.annotation.ColorRes;
import android.support.annotation.DrawableRes; import android.support.annotation.DrawableRes;
import android.support.annotation.StringRes; import android.support.annotation.StringRes;
...@@ -33,9 +34,11 @@ public class MessageExtraActionItemViewHolder extends RecyclerView.ViewHolder { ...@@ -33,9 +34,11 @@ public class MessageExtraActionItemViewHolder extends RecyclerView.ViewHolder {
} }
public void setIconBackgroundColorTint(@ColorRes int color) { public void setIconBackgroundColorTint(@ColorRes int color) {
// Drawable background = DrawableCompat.wrap(messageSpecIcon.getBackground()); Drawable background = DrawableCompat.wrap(iconView.getBackground());
DrawableCompat.setTint(iconView.getBackground(), DrawableCompat.setTint(background,
ContextCompat.getColor(iconView.getContext(), color)); ContextCompat.getColor(iconView.getContext(), color));
iconView.setBackground(background);
} }
public void setIcon(@DrawableRes int icon) { public void setIcon(@DrawableRes int icon) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment