Back to project page holoaccent.
The source code is released under:
Apache License
If you think the Android project holoaccent listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.negusoft.holoaccent.interceptor; /*w ww .j a v a2 s . co m*/ import android.content.res.Resources; import android.graphics.drawable.Drawable; import com.negusoft.holoaccent.AccentPalette; import com.negusoft.holoaccent.AccentResources; import com.negusoft.holoaccent.R; import com.negusoft.holoaccent.drawable.SearchViewDrawable; public class SearchViewTextFieldInterceptor implements AccentResources.Interceptor { public static final int DEFAULT_COLOR = 0x4Dffffff; public static final int DEFAULT_COLOR_LIGHT = 0x4D000000; @Override public Drawable getDrawable(Resources res, AccentPalette palette, int resId) { if (resId == R.drawable.ha__ab_searchview_textfield_focused_reference) return new SearchViewDrawable(res.getDisplayMetrics(), palette.accentColor); if (resId == R.drawable.ha__ab_searchview_textfield_default_reference) return new SearchViewDrawable(res.getDisplayMetrics(), DEFAULT_COLOR); if (resId == R.drawable.ha__ab_searchview_textfield_default_light_reference) return new SearchViewDrawable(res.getDisplayMetrics(), DEFAULT_COLOR_LIGHT); return null; } }