Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

floatingactionbutton image color

app:tint="@android:color/white"
Comment

floatingactionbutton image color


//get the drawable
Drawable myFabSrc = getResources().getDrawable(android.R.drawable.ic_input_add);
//copy it in a new one
Drawable willBeWhite = myFabSrc.getConstantState().newDrawable();
//set the color filter, you can use also Mode.SRC_ATOP
willBeWhite.mutate().setColorFilter(Color.WHITE, PorterDuff.Mode.MULTIPLY);
//set it to your fab button initialized before
myFabName.setImageDrawable(willBeWhite);

Comment

PREVIOUS NEXT
Code Example
Java :: getcurrencyinstance java india 
Java :: java how to generate guid 
Java :: how to get the highest value in a list java 
Java :: java double to string with 2 decimals 
Java :: how to print elements in matrix java 
Java :: android parse time 
Java :: jfilechooser file filter 
Java :: coding fill method java 
Java :: Which package contains the Java Collections Framework? Group of answer choices java.net 
Java :: how to resice image button src 
Java :: java arraylist get number of elements with same parameter 
Java :: wat is voorbereiden voltooid deelwoord 
Java :: how to print the last element of an array 
Java :: void get method using collections 
Java :: java split array into two 
Java :: right click java 
Java :: java loop through string 
Java :: Java Number Field 
Java :: android navigation bar color change 
Java :: java new arraylist of n zeros 
Java :: assertthat code throws exception 
Java :: arrange item center android studio linear layout 
Java :: separate string by comma java 
Java :: jsp import 
Java :: access main class from another class spigot 
Java :: java event enter key 
Java :: load a file from classpath spring boot 
Java :: shift elements in array java 
Java :: gitignore java 
Java :: transformez integer en string 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =