title: Android circle constraint programmatically radius
body: <p>I started to use the "new" constraint option from <code>ConstraintLayout</code>, the <strong>circle constraint</strong>.</p>
  
  <p>I would like to apply the value for the <code>layout_constraintCircleRadius</code> attribute programmatically, once I will be calculating the view's radius also programmatically.</p>
  
  <p>I have tried many different ways using the </p>
  
  <p><strong><code>public void constrainCircle (int viewId,int id,int radius,float angle)</code></strong> </p>
  
  <p>method described from the <a href="https://developer.android.com/reference/android/support/constraint/ConstraintSet" rel="noreferrer"><strong>document</strong></a>.</p>
  
  <p>I also searched on many forums about it but I could not find anything. Have someone ever experienced such problem?</p>
  
  <pre><code>&lt;android.support.constraint.ConstraintLayout
      android:id="@+id/circle_constraint"
      android:layout_width="0dp"
      android:layout_height="0dp"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintWidth_percent="0.8"
      app:layout_constraintDimensionRatio="W,1:1"
      android:background="@drawable/circle"&gt;
  
      &lt;View
          android:id="@+id/circle_center"
          android:layout_width="20dp"
          android:layout_height="20dp"
          app:layout_constraintTop_toTopOf="parent"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          android:background="#ff0000"/&gt;
  
      &lt;View
          android:id="@+id/circle_position_0"
          android:layout_width="30dp"
          android:layout_height="27dp"
          android:background="#000000"
          app:layout_constraintCircle="@id/circle_center"/&gt;
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>The circle_center will stay in the middle of the main constraint view and I would like to apply programatically the radius and angle to the circle_position_0.</p>
  
  <p>Thank You!</p>