public abstract class AbstractSpecLayerGroup<T extends AbstractSpecLayerGroup> extends java.lang.Object implements RhythmSpecLayerParent
Modifier and Type | Field and Description |
---|---|
protected static int |
ESTIMATED_AVG_LAYERS |
protected java.util.List<RhythmSpecLayer> |
mLayers |
Constructor and Description |
---|
AbstractSpecLayerGroup() |
AbstractSpecLayerGroup(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
T |
addLayer(RhythmSpecLayer layer)
Add a spec layer to this group.
|
void |
draw(android.graphics.Canvas canvas,
android.graphics.Rect drawableBounds)
Draw itself to the provided canvas within provided bounds according to internal configuration (if any)
|
int |
size()
Return the number of children in this layer group
|
protected static final int ESTIMATED_AVG_LAYERS
protected java.util.List<RhythmSpecLayer> mLayers
public AbstractSpecLayerGroup()
public AbstractSpecLayerGroup(int initialCapacity)
public void draw(android.graphics.Canvas canvas, android.graphics.Rect drawableBounds)
RhythmSpecLayer
draw
in interface RhythmSpecLayer
canvas
- Canvas for the layer to draw itself todrawableBounds
- Bounds where this layer should draw itself. Since these are the bounds of a RhythmDrawable
connected to the view, they are usually the same as the view’s bounds, so
you can use this parameter to get the view’s dimensions should you need them.public T addLayer(RhythmSpecLayer layer)
View.invalidateDrawable(Drawable)
or similar yourself.addLayer
in interface RhythmSpecLayerParent
layer
- A Rhythm spec layerpublic int size()