├── after.png ├── before.png ├── app └── src │ └── main │ ├── res │ ├── drawable-hdpi │ │ ├── ic_clear_black_48dp.png │ │ ├── ic_clear_white_48dp.png │ │ ├── ic_face_white_48dp.png │ │ ├── ic_mood_white_48dp.png │ │ ├── ic_share_white_48dp.png │ │ ├── ic_cancel_white_48dp.png │ │ ├── ic_receipt_black_48dp.png │ │ ├── ic_refresh_black_48dp.png │ │ ├── ic_search_white_48dp.png │ │ ├── ic_directions_white_48dp.png │ │ ├── ic_favorite_white_48dp.png │ │ ├── ic_navigation_white_48dp.png │ │ ├── ic_whatshot_white_48dp.png │ │ ├── ic_fingerprint_white_48dp.png │ │ ├── ic_screen_share_black_48dp.png │ │ └── ic_restaurant_menu_black_48dp.png │ ├── drawable-mdpi │ │ ├── ic_clear_black_48dp.png │ │ ├── ic_clear_white_48dp.png │ │ ├── ic_face_white_48dp.png │ │ ├── ic_mood_white_48dp.png │ │ ├── ic_share_white_48dp.png │ │ ├── ic_cancel_white_48dp.png │ │ ├── ic_receipt_black_48dp.png │ │ ├── ic_refresh_black_48dp.png │ │ ├── ic_search_white_48dp.png │ │ ├── ic_directions_white_48dp.png │ │ ├── ic_favorite_white_48dp.png │ │ ├── ic_navigation_white_48dp.png │ │ ├── ic_whatshot_white_48dp.png │ │ ├── ic_fingerprint_white_48dp.png │ │ ├── ic_screen_share_black_48dp.png │ │ └── ic_restaurant_menu_black_48dp.png │ ├── drawable-xhdpi │ │ ├── ic_face_white_48dp.png │ │ ├── ic_mood_white_48dp.png │ │ ├── ic_cancel_white_48dp.png │ │ ├── ic_clear_black_48dp.png │ │ ├── ic_clear_white_48dp.png │ │ ├── ic_search_white_48dp.png │ │ ├── ic_share_white_48dp.png │ │ ├── ic_favorite_white_48dp.png │ │ ├── ic_receipt_black_48dp.png │ │ ├── ic_refresh_black_48dp.png │ │ ├── ic_whatshot_white_48dp.png │ │ ├── ic_directions_white_48dp.png │ │ ├── ic_fingerprint_white_48dp.png │ │ ├── ic_navigation_white_48dp.png │ │ ├── ic_screen_share_black_48dp.png │ │ └── ic_restaurant_menu_black_48dp.png │ ├── drawable-xxhdpi │ │ ├── ic_clear_black_48dp.png │ │ ├── ic_clear_white_48dp.png │ │ ├── ic_face_white_48dp.png │ │ ├── ic_mood_white_48dp.png │ │ ├── ic_share_white_48dp.png │ │ ├── ic_cancel_white_48dp.png │ │ ├── ic_favorite_white_48dp.png │ │ ├── ic_receipt_black_48dp.png │ │ ├── ic_refresh_black_48dp.png │ │ ├── ic_search_white_48dp.png │ │ ├── ic_whatshot_white_48dp.png │ │ ├── ic_directions_white_48dp.png │ │ ├── ic_navigation_white_48dp.png │ │ ├── ic_fingerprint_white_48dp.png │ │ ├── ic_screen_share_black_48dp.png │ │ └── ic_restaurant_menu_black_48dp.png │ ├── drawable-xxxhdpi │ │ ├── ic_face_white_48dp.png │ │ ├── ic_mood_white_48dp.png │ │ ├── ic_cancel_white_48dp.png │ │ ├── ic_clear_black_48dp.png │ │ ├── ic_clear_white_48dp.png │ │ ├── ic_receipt_black_48dp.png │ │ ├── ic_refresh_black_48dp.png │ │ ├── ic_search_white_48dp.png │ │ ├── ic_share_white_48dp.png │ │ ├── ic_favorite_white_48dp.png │ │ ├── ic_whatshot_white_48dp.png │ │ ├── ic_directions_white_48dp.png │ │ ├── ic_fingerprint_white_48dp.png │ │ ├── ic_navigation_white_48dp.png │ │ ├── ic_screen_share_black_48dp.png │ │ └── ic_restaurant_menu_black_48dp.png │ ├── values │ │ ├── strings.xml │ │ ├── dimens.xml │ │ ├── styles.xml │ │ └── colors.xml │ └── layout │ │ └── activity_main.xml │ └── java │ └── com │ └── mathi │ └── drawablecolorchange │ └── MainActivity.java ├── README.md ├── drawablecolorchange └── src │ └── main │ └── java │ └── com │ └── drawablecolorchange │ └── DrawableColorChange.java └── LICENCE /after.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/after.png -------------------------------------------------------------------------------- /before.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/before.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_clear_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_clear_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_clear_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_clear_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_face_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_face_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_mood_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_mood_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_share_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_share_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_clear_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_clear_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_clear_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_clear_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_face_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_face_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_mood_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_mood_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_share_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_share_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_face_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_face_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_mood_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_mood_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_cancel_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_cancel_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_receipt_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_receipt_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_refresh_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_refresh_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_search_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_search_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_cancel_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_cancel_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_receipt_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_receipt_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_refresh_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_refresh_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_search_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_search_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_cancel_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_cancel_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_clear_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_clear_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_clear_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_clear_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_search_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_search_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_share_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_share_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_clear_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_clear_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_clear_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_clear_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_face_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_face_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_mood_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_mood_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_share_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_share_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_face_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_face_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_mood_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_mood_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_directions_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_directions_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_favorite_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_favorite_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_navigation_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_navigation_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_whatshot_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_whatshot_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_directions_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_directions_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_favorite_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_favorite_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_navigation_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_navigation_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_whatshot_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_whatshot_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_favorite_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_favorite_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_receipt_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_receipt_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_refresh_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_refresh_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_whatshot_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_whatshot_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_cancel_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_cancel_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_favorite_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_favorite_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_receipt_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_receipt_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_refresh_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_refresh_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_search_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_search_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_whatshot_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_whatshot_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_cancel_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_cancel_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_clear_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_clear_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_clear_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_clear_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_receipt_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_receipt_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_refresh_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_refresh_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_search_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_search_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_share_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_share_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_fingerprint_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_fingerprint_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_screen_share_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_screen_share_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_fingerprint_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_fingerprint_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_screen_share_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_screen_share_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_directions_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_directions_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_fingerprint_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_fingerprint_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_navigation_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_navigation_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_directions_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_directions_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_navigation_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_navigation_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_favorite_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_favorite_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_whatshot_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_whatshot_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | DrawableColorChange 3 | Change Color 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_restaurant_menu_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-hdpi/ic_restaurant_menu_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_restaurant_menu_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-mdpi/ic_restaurant_menu_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_screen_share_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_screen_share_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_fingerprint_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_fingerprint_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_screen_share_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_screen_share_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_directions_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_directions_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_fingerprint_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_fingerprint_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_navigation_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_navigation_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_screen_share_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_screen_share_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_restaurant_menu_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xhdpi/ic_restaurant_menu_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_restaurant_menu_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxhdpi/ic_restaurant_menu_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_restaurant_menu_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mathiazhagan01/DrawableColorChange/HEAD/app/src/main/res/drawable-xxxhdpi/ic_restaurant_menu_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2196F3 4 | #1976D2 5 | #03A9F4 6 | 7 | #E91E63 8 | #4CAF50 9 | #009688 10 | #FF9800 11 | #FFC107 12 | #FF5722 13 | #795548 14 | #F44336 15 | #607D8B 16 | #3F51B5 17 | 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DrawableColorChange 2 | Android Library to dynamically change color of drawable. 3 | 4 | [![](https://jitpack.io/v/mathiazhagan01/DrawableColorChange.svg)](https://jitpack.io/#mathiazhagan01/DrawableColorChange) 5 | [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DrawableColorChange-blue.svg?style=flat-square)](http://android-arsenal.com/details/3/4353) 6 | 7 | [![Codix](https://codix.io/gh/badge/mathiazhagan01/DrawableColorChange)](https://codix.io/gh/repo/mathiazhagan01/DrawableColorChange) 8 | 9 | If you like the library, please rate us on codix.io! 10 | 11 | ### Gradle 12 | 13 | #### Step 1. Add the JitPack repository to your build file 14 | Add it in your root build.gradle at the end of repositories: 15 | 16 | ``` gradle 17 | allprojects { 18 | repositories { 19 | ... 20 | maven { url "https://jitpack.io" } 21 | } 22 | } 23 | ``` 24 | 25 | #### Step 2. Add the dependency 26 | 27 | ``` gradle 28 | dependencies { 29 | compile 'com.github.mathiazhagan01:DrawableColorChange:1.4' 30 | } 31 | ``` 32 | 33 | ### Maven 34 | 35 | #### Step 1. Add the JitPack repository to your build file 36 | 37 | ``` xml 38 | 39 | 40 | jitpack.io 41 | https://jitpack.io 42 | 43 | 44 | ``` 45 | 46 | #### Step 2. Add the dependency 47 | 48 | ``` xml 49 | 50 | com.github.mathiazhagan01 51 | DrawableColorChange 52 | 1.4 53 | 54 | ``` 55 | 56 | ### Before changing color 57 | 58 | ![Screenshot](./before.png) 59 | 60 | ### After changing color 61 | 62 | ![Screenshot](./after.png) 63 | 64 | ### Example 1 65 | 66 | ``` java 67 | DrawableColorChange drawableColorChange = new DrawableColorChange(this); 68 | 69 | drawableColorChange.setDrawable(R.drawable.icon); 70 | drawableColorChange.setColorResId(R.color.colorAccent); 71 | Drawable drawable = drawableColorChange.getColorChangedDrawable(); 72 | ImageView imageView = (ImageView) findViewById(R.id.image); 73 | imageView.setImageDrawable(drawable); 74 | ``` 75 | 76 | ### Example 2 77 | 78 | ``` java 79 | imageView.setImageDrawable(drawableColorChange.changeColorById(R.drawable.icon, R.color.colorAccent)); 80 | ``` 81 | 82 | ### Example 3 83 | 84 | ``` java 85 | drawableColorChange.setDrawable(R.drawable.icon); 86 | drawableColorChange.setColorResId(R.color.colorAccent); 87 | Bitmap bitmap = drawableColorChange.getColorChangedBitmap(); 88 | imageView.setImageBitmap(bitmap); 89 | ``` 90 | 91 | ### LICENSE 92 | 93 | DrawableColorChange library for Android 94 | Copyright (c) 2017 Mathiazhagan Dinesh (http://github.com/mathiazhagan01). 95 | 96 | Licensed under the Apache License, Version 2.0 (the "License"); 97 | you may not use this file except in compliance with the License. 98 | You may obtain a copy of the License at 99 | 100 | http://www.apache.org/licenses/LICENSE-2.0 101 | 102 | Unless required by applicable law or agreed to in writing, software 103 | distributed under the License is distributed on an "AS IS" BASIS, 104 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 105 | See the License for the specific language governing permissions and 106 | limitations under the License. 107 | -------------------------------------------------------------------------------- /drawablecolorchange/src/main/java/com/drawablecolorchange/DrawableColorChange.java: -------------------------------------------------------------------------------- 1 | package com.drawablecolorchange; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | import android.graphics.Canvas; 6 | import android.graphics.PorterDuff; 7 | import android.graphics.PorterDuffColorFilter; 8 | import android.graphics.drawable.BitmapDrawable; 9 | import android.graphics.drawable.Drawable; 10 | import android.support.annotation.ColorInt; 11 | import android.support.annotation.ColorRes; 12 | import android.support.annotation.DrawableRes; 13 | import android.support.v4.content.res.ResourcesCompat; 14 | 15 | /** 16 | * Created by Mathiazhagan on 18-09-2016. 17 | */ 18 | public class DrawableColorChange { 19 | Context context; 20 | Drawable drawable = null; 21 | Integer color = null; 22 | 23 | public DrawableColorChange(Context context) { 24 | this.context = context; 25 | } 26 | 27 | public void setDrawable(Drawable drawable) { 28 | this.drawable = drawable; 29 | } 30 | 31 | public void setDrawable(@DrawableRes int drawableResId) { 32 | this.drawable = ResourcesCompat.getDrawable(context.getResources(), drawableResId, null); 33 | } 34 | 35 | public void setDrawable(Bitmap bitmap) { 36 | setBitmap(bitmap); 37 | } 38 | 39 | public void setBitmap(Bitmap bitmap) { 40 | setDrawable(bitmapToDrawable(bitmap)); 41 | } 42 | 43 | public void setBitmap(Drawable drawable) { 44 | setDrawable(drawable); 45 | } 46 | 47 | public void setBitmap(@DrawableRes int drawableResId) { 48 | setDrawable(drawableResId); 49 | } 50 | 51 | public void setColor(@ColorInt Integer color) { 52 | this.color = color; 53 | } 54 | 55 | public void setColorResId(@ColorRes Integer colorResId) { 56 | if (colorResId != null) { 57 | this.color = ResourcesCompat.getColor(context.getResources(), colorResId, null); 58 | } 59 | } 60 | 61 | private void changeColor() { 62 | if (drawable == null) { 63 | throw new NullPointerException("Drawable is null. Please set drawable by setDrawable() or setBitmap() method"); 64 | } 65 | if (color == null) { 66 | throw new NullPointerException("Color is null. Please set color by setColor() or setColorResID() method"); 67 | } 68 | drawable.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN)); 69 | } 70 | 71 | public Drawable getColorChangedDrawable() { 72 | changeColor(); 73 | return drawable; 74 | } 75 | 76 | private Bitmap drawableToBitmap() throws OutOfMemoryError { 77 | Bitmap mutableBitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); 78 | Canvas canvas = new Canvas(mutableBitmap); 79 | drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight()); 80 | drawable.draw(canvas); 81 | return mutableBitmap; 82 | } 83 | 84 | public Bitmap getColorChangedBitmap() { 85 | if (drawable == null) { 86 | throw new NullPointerException("Drawable is null. Please set drawable by setDrawable() or setBitmap() method"); 87 | } 88 | if (color == null) { 89 | throw new NullPointerException("Color is null. Please set color by setColor() or setColorResID() method"); 90 | } 91 | changeColor(); 92 | return drawableToBitmap(); 93 | } 94 | 95 | private Drawable bitmapToDrawable(Bitmap bitmap) { 96 | return new BitmapDrawable(context.getResources(), bitmap); 97 | } 98 | 99 | public Drawable changeColorById(@DrawableRes Integer drawableResId, @ColorRes Integer colorResId) { 100 | setDrawable(drawableResId); 101 | if (colorResId != null) 102 | setColorResId(colorResId); 103 | return getColorChangedDrawable(); 104 | } 105 | 106 | public Drawable changeColorById(Drawable drawable, @ColorRes Integer colorResId) { 107 | setDrawable(drawable); 108 | if (colorResId != null) 109 | setColorResId(colorResId); 110 | return getColorChangedDrawable(); 111 | } 112 | 113 | public Drawable changeColorById(Bitmap bitmap, @ColorRes Integer colorResId) { 114 | return changeColorById(bitmapToDrawable(bitmap), colorResId); 115 | } 116 | 117 | public Drawable changeColorByColor(@DrawableRes Integer drawableResId, @ColorInt Integer color) { 118 | setDrawable(drawableResId); 119 | if (color != null) 120 | setColor(color); 121 | return getColorChangedDrawable(); 122 | } 123 | 124 | public Drawable changeColorByColor(Drawable drawable, @ColorInt Integer color) { 125 | setDrawable(drawable); 126 | if (color != null) 127 | setColor(color); 128 | return getColorChangedDrawable(); 129 | } 130 | 131 | public Drawable changeColorByColor(Bitmap bitmap, @ColorInt Integer color) { 132 | return changeColorByColor(bitmapToDrawable(bitmap), color); 133 | } 134 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 19 | 20 | 26 | 27 | 33 | 34 | 40 | 41 | 47 | 48 | 49 | 52 | 53 | 59 | 60 | 66 | 67 | 73 | 74 | 80 | 81 | 87 | 88 | 89 | 92 | 93 | 99 | 100 | 106 | 107 | 113 | 114 | 120 | 121 | 127 | 128 | 129 | 134 | 135 |