public class RhythmOverlay extends AbstractSpecLayerGroup<RhythmOverlay>
RhythmDrawable
(s) where this overlay is currently set. Composed of granular RhythmSpecLayer
s, which hold
their own configuration (see descriptions of respectable implementations) and are drawn in the order of adding.Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
mTitle |
ESTIMATED_AVG_LAYERS, mLayers
Constructor and Description |
---|
RhythmOverlay()
Create a new overlay
|
RhythmOverlay(int initialCapacity)
Create a new overlay with initial capacity
|
Modifier and Type | Method and Description |
---|---|
RhythmOverlay |
addLayersFrom(RhythmOverlay source)
Add all layers to this overlay from another.
|
java.lang.String |
getTitle()
Get overlay title
|
RhythmOverlay |
setTitle(java.lang.String title)
Set the title for this overlay.
|
java.lang.String |
toString() |
addLayer, draw, size
public RhythmOverlay()
public RhythmOverlay(int initialCapacity)
initialCapacity
- anticipated number of child layerspublic RhythmOverlay setTitle(java.lang.String title)
title
- A convenient title for this overlay.public java.lang.String getTitle()
null
if the overlay is anonymouspublic RhythmOverlay addLayersFrom(@NonNull RhythmOverlay source)
Add all layers to this overlay from another. Convenient if you have a common set of layers that you wish to include in multiple overlays, or want to create an overlay that combines a few others.
Warning: for simplicity and performance reasons the same layer objects are used, therefore it’s strongly advised that you don’t mutate them after adding.
source
- Existing overlay to add all layers frompublic java.lang.String toString()
toString
in class java.lang.Object