title: How to create square button in android for background?
body: <p><a href="https://i.stack.imgur.com/vEs7C.png" rel="nofollow noreferrer">img</a></p>
  
  <p>I want to create square shape in background. Android studio shape doesn,t support square.How to create manually in border.xml?</p>
  
  <p>Here is my code</p>
  
  <p>border.xml</p>
  
  <pre><code>&lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
      &lt;solid android:color="#9294a3" /&gt;
  
      &lt;stroke
      android:width="2dp"
      android:color="#c2bbbb" /&gt;
  
      &lt;corners android:radius="2dp" /&gt;
  
  &lt;/shape&gt;
  </code></pre>
  
  <p>my.xml</p>
  
  <pre><code>   &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="70dp"
      android:background="#9294a3"&gt;
  
          &lt;TextView
          android:id="@+id/tv_2"
          android:layout_width="wrap_content"
          android:text="2"
          android:textColor="#c2bbbb"
          android:textSize="30sp"
          android:background="@drawable/border"
          android:layout_height="wrap_content" /&gt;
  
      &lt;/LinearLayout
  </code></pre>