CircularFlow
class CircularFlow : VirtualLayout
| kotlin.Any | ||||
| ↳ | android.view.View | |||
| ↳ | androidx.constraintlayout.widget.ConstraintHelper | |||
| ↳ | androidx.constraintlayout.widget.VirtualLayout | |||
| ↳ | androidx.constraintlayout.helper.widget.CircularFlow |
CircularFlow virtual layout. Allows positioning of referenced widgets circular. The elements referenced are indicated via constraint_referenced_ids, as with other ConstraintHelper implementations. XML attributes that are needed:
- constraint_referenced_ids = "view2, view3, view4,view5,view6". It receives id's of the views that will add the references.
- circularflow_viewCenter = "view1". It receives the id of the view of the center where the views received in constraint_referenced_ids will be referenced.
- circularflow_angles = "45,90,135,180,225". Receive the angles that you will assign to each view.
- circularflow_radiusInDP = "90,100,110,120,130". Receive the radios in DP that you will assign to each view.
Summary
Public constructors |
|---|
CircularFlow(context: Context!) |
CircularFlow(context: Context!, attrs: AttributeSet!) |
CircularFlow(context: Context!, attrs: AttributeSet!, defStyleAttr: Int) |
Public functions |
|
|---|---|
Unit |
addViewToCircularFlow(view: View!, radius: Int, angle: Float)Add a view to the CircularFlow. |
FloatArray<Float>! |
|
IntArray<Int>! |
|
Boolean |
isUpdatable(view: View!)if view is part of circular flow |
Unit |
|
Int |
removeView(view: View!)Remove a given view from the helper. |
Unit |
setDefaultAngle(angle: Float)Set default Angle for CircularFlow. |
Unit |
setDefaultRadius(radius: Int)Set default Radius for CircularFlow. |
Unit |
updateAngle(view: View!, angle: Float)Update angle from a view in CircularFlow. |
Unit |
updateRadius(view: View!, radius: Int)Update radius from a view in CircularFlow. |
Unit |
updateReference(view: View!, radius: Int, angle: Float)Update angle and radius from a view in CircularFlow. |
Protected functions |
|
|---|---|
Unit |
init(attrs: AttributeSet!) |
Inherited Constants |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited properties |
|---|
Public constructors
CircularFlow
CircularFlow(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)
Public functions
addViewToCircularFlow
fun addViewToCircularFlow(view: View!, radius: Int, angle: Float): Unit
Add a view to the CircularFlow. The referenced view need to be a child of the container parent. The view also need to have its id set in order to be added. The views previous need to have its radius and angle set in order to be added correctly a new view.
| Returns | |
|---|---|
Unit |
isUpdatable
fun isUpdatable(view: View!): Boolean
if view is part of circular flow
| Parameters | |
|---|---|
view: View! |
| Returns | |
|---|---|
Boolean |
true if the flow contains the view |
removeView
fun removeView(view: View!): Int
Remove a given view from the helper.
| Parameters | |
|---|---|
view: View! |
| Returns | |
|---|---|
Int |
index of view removed |
setDefaultAngle
fun setDefaultAngle(angle: Float): Unit
Set default Angle for CircularFlow.
| Parameters | |
|---|---|
angle: Float |
| Returns | |
|---|---|
Unit |
setDefaultRadius
fun setDefaultRadius(radius: Int): Unit
Set default Radius for CircularFlow.
| Parameters | |
|---|---|
radius: Int |
| Returns | |
|---|---|
Unit |
updateAngle
fun updateAngle(view: View!, angle: Float): Unit
Update angle from a view in CircularFlow. The referenced view need to be a child of the container parent. The view also need to have its id set in order to be added.
| Returns | |
|---|---|
Unit |
updateRadius
fun updateRadius(view: View!, radius: Int): Unit
Update radius from a view in CircularFlow. The referenced view need to be a child of the container parent. The view also need to have its id set in order to be added.
| Returns | |
|---|---|
Unit |