Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

android dynamically create layer-list with item and shape site:stackoverflow.com

    GradientDrawable layer1 = new GradientDrawable();
    layer1.setShape(GradientDrawable.OVAL);
    layer1.setSize(33,33);
    layer1.setColor(Color.WHITE);
    layer1.setStroke(4,Color.RED);

    GradientDrawable layer2 = new GradientDrawable();
    layer2.setShape(GradientDrawable.OVAL);
    layer2.setColor(Color.BLUE);

    InsetDrawable insetLayer2 = new InsetDrawable(layer1, 8, 8, 8, 8);

    LayerDrawable layerDrawable = new LayerDrawable(new Drawable[]
    {insetLayer2,layer2});
    button.setBackground(layerDrawable);
Comment

PREVIOUS NEXT
Code Example
Java :: log errors with stack traces spring 
Java :: how to decode a ByteArray to Bitman in adroid 
Java :: last block incomplete in decryption 
Java :: difido 
Java :: UIManager.setLookAndFeel Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke because "style" is null 
Java :: javafx line chaart duplicate series added 
Java :: a Java-8 stream of batches, 
Java :: java see you next happy year 
Java :: how to iterate list in java selenium 
Java :: java regex check if group exists 
Java :: java tcp readline not working 
Java :: Java 8 merge multiple collections. 
Java :: codding loop 
Java :: Java Another form of assertion statement 
Java :: how to get the length of a jagged array java 
Java :: dividing numbers using method 
Java :: what are construtcor java 
Java :: java lexographic 
Java :: how to get address of object in java 
Java :: priority queue is empty java 
Java :: converting temperature from fahrenheit to celsius 
Java :: connect 2 package in android 
Java :: for loop in firebase snapshot in java 
Java :: modelmapper abstract class 
Java :: Uri/Beecrowd problem no - 1146 solution in Java 
Java :: how to add a command to a button 
Java :: iterator Implementation 
Java :: reference to an instance method of an arbitrary object of a particular type 
Java :: detect jpanel size change listener 
Java :: minecraft block java 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =