-1

I have downloaded a check icon(24 dp) from android material design library from the link https://design.google.com/icons/. There are only two colours available black and white, but I need the colour of tick icon to be a shade of green(I have the colour hex code). How do I change the colour of icon in android and how do I change the shape as well. The shape that we get are square or circular. I need elliptical at one end and square at the other. Do I need to use some design tools for that. Thank you.

Shubham Khare
  • 171
  • 1
  • 1
  • 12

6 Answers6

1

try with this excellent service

https://romannurik.github.io/AndroidAssetStudio/

1

make a selector for checked and unchecked icon like this

 <selector xmlns:android="http://schemas.android.com/apk/res/android">

         <item android:state_checked="true" android:drawable="@drawable/checked" />
         <item android:state_checked="false" android:drawable="@drawable/unchecked" />

    </selector>

and apply it on checkbox using button attribute like this

 android:button="@drawable/<your selector>"

You can use flaticon.com for checked and unchecked button

AbhayBohra
  • 2,047
  • 24
  • 36
0

Download icon from https://icons8.com/. In this you can change color of icon as you want to do.

D.J
  • 1,439
  • 1
  • 12
  • 23
0

You can use the TintImageView within the appcompat support library and then tinting/coloring the imageview is by simply calling the android:backgroundTint to tint the imageview into one color. add this line to your dependency:

compile 'com.android.support:appcompat-v24:+'

and then

<TintImageView
android:layout_width=""
android:layout_height="" 
android:src=""
android:backgroundTint="@color/green"/>

so the above xml will tint the imageView to color green.

mohammadreza khalifeh
  • 1,510
  • 2
  • 18
  • 32
0

1- Download font file from this page

2- Found the character entities for icons, using this page. For example alarm_on

3- Use like this example

4- Change android:textColor property from xml file

Community
  • 1
  • 1
Caner Balım
  • 556
  • 9
  • 21
0
android:tint="#ffffff"

Add this attribute to the image view element.

Felix
  • 824
  • 8
  • 21