public class Columns extends AbstractSpecLayerGroup<Columns>
Modifier and Type | Class and Description |
---|---|
static class |
Columns.Factory
|
Modifier and Type | Field and Description |
---|---|
protected int |
mColumnCount |
ESTIMATED_AVG_LAYERS, mLayers
Modifier | Constructor and Description |
---|---|
protected |
Columns()
Create spec layer that will evenly divide current bounds in given number of columns and then draw all child
layers in each.
|
|
Columns(int columnCount)
Create spec layer that will evenly divide current bounds in given number of columns and then draw all child
layers in each
|
|
Columns(int columnCount,
int initialCapacity)
Create spec layer that will evenly divide current bounds in given number of columns and then draw all child
layers in each
|
Modifier and Type | Method and Description |
---|---|
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)
|
Columns |
setColumnCount(int columnCount)
Set the number of columns
|
addLayer, size
public Columns(int columnCount)
columnCount
- number of columns, must be a positive integerpublic Columns(int columnCount, int initialCapacity)
columnCount
- number of columns, must be a positive integerinitialCapacity
- anticipated number of child layersprotected Columns()
Create spec layer that will evenly divide current bounds in given number of columns and then draw all child layers in each.
This is a minimum constructor for the factory — only paints and reusable objects are initialized. Developers extending this class are responsible for setting all fields to proper argument values.
public Columns setColumnCount(int columnCount)
columnCount
- number of columns, must be a positive integerpublic void draw(android.graphics.Canvas canvas, android.graphics.Rect drawableBounds)
RhythmSpecLayer
draw
in interface RhythmSpecLayer
draw
in class AbstractSpecLayerGroup<Columns>
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.