title: Semi Circular Progress bar Android - drawing semi circle
body: <p>I created a semi circular progress bar using this <a href="https://github.com/devadvance/circularseekbar" rel="nofollow noreferrer">devadvance\circularSeekBar</a>
  and it looks like this when I select that custom view from the palette.</p>
  
  <p><img src="https://i.stack.imgur.com/ABvmg.png" alt="progress bar in palette">.</p>
  
  <p>In this I have two Relative layouts with weights. Weight of the layout containing the progress bar is 2 and the bottom one has weight of 3. And layout width and height of the progress bar is set to wrap content.</p>
  
  <p>So my issue is why does the progress bar look like this when selected from palette? Is it that the canvas size takes the perfect square? What I want is the semi circular progress bar to be fully enclosed by the layout like this. </p>
  
  <p><img src="https://i.stack.imgur.com/3I6Hl.png" alt="expected"> </p>
  
  <p>Any light on this is appreciated.</p>
  
  <p><strong>EDIT</strong> xml code </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/main_parent_view"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:fitsSystemWindows="true"&gt;
  
      &lt;include layout="@layout/toolbar"/&gt;
  
      &lt;android.support.v4.widget.DrawerLayout
          android:id="@+id/drawer_layout"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="3"&gt;
  
          &lt;LinearLayout
              android:id="@+id/content_frame"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical"&gt;
  
              &lt;RelativeLayout xmlns:app = "http://schemas.android.com/apk/res-auto"
                  android:id ="@+id/calorie_frame"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_weight="2"
                  android:clickable="true"&gt;
                  &lt;com.devadvance.circularseekbar.CircularSeekBar
                      android:id="@+id/calorie_progressbar"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      app:start_angle = "180"
                      app:end_angle = "0"
                      app:progress = "25"
                      app:circle_x_radius="200"
                      app:circle_y_radius="200"
                      app:circle_stroke_width = "30"
                      app:use_custom_radii="true"
                      app:circle_color ="#FFFACD"
  
                      android:layout_alignParentEnd="false"
                      android:layout_alignParentStart="false"
                      android:layout_centerInParent="true" /&gt;
                  &lt;/RelativeLayout&gt;
  
              &lt;RelativeLayout
                  android:id="@+id/exercise_frame"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_weight="3"
                  android:clickable="true"&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:textAppearance="?android:attr/textAppearanceMedium"
                      android:text="@string/calorie_label"
                      android:id="@+id/textView"
                      android:layout_marginBottom="40dp"
                      android:layout_alignParentBottom="true"
                      android:layout_alignParentRight="true"
                      android:layout_alignParentEnd="true"
                      android:layout_marginRight="20dp" /&gt;
  
                  &lt;ImageView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:id="@+id/imageView"
                      android:layout_alignBottom="@+id/textView"
                      android:layout_alignParentLeft="true"
                      android:layout_alignParentStart="true"
                      android:layout_marginLeft="50dp"
                      android:layout_marginStart="50dp"
                      android:contentDescription="@string/exercise_image" /&gt;
  
              &lt;/RelativeLayout&gt;
          &lt;/LinearLayout&gt;
  
          &lt;ListView
              android:id="@+id/left_drawer"
              android:layout_width="240dp"
              android:layout_height="match_parent"
              android:layout_gravity="start"
              android:choiceMode="singleChoice"
              android:divider="@android:color/transparent"
              android:dividerHeight="0dp"
              android:background="#999"/&gt;
      &lt;/android.support.v4.widget.DrawerLayout&gt;
  
  &lt;/LinearLayout&gt;</code></pre>
  </div>
  </div>
  </p>