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);
Also in Java:
- usaco 2018 january contest
- treemap get order java
- how to input in java
- java scanner input int
- how to get all the names of the files in a folder in java?
- java switch
- android get sdk version
- how to split string with dolor sign in java
- how to create an action listener in java
- java create circle
- java file download
- how to check the lines in a file java scanner
- even or odd in java
- if statement java
- guess the number java
- function in java
- how to install java 8 on terminal os
- pascals triangle java
- get drawable with string android java
- linux command to see all the java version installed
- java doreturn void
- java ternary operator
- 3-way radix quicksort java
- get tfidf score for a sentence