title: Android: Top and bottom padding of text in listview item
body: <p>I am developing an application in which i am using a custom list view. The XML code is as follows :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@drawable/loginbg" &gt;
  
      &lt;RelativeLayout
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_margin="15sp"
          android:background="@android:color/white" &gt;
  
          &lt;ListView
              android:id="@+id/listview"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:divider="#000000"
              android:dividerHeight=".5sp" &gt;
          &lt;/ListView&gt;
      &lt;/RelativeLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And my custom adapter XML is :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" &gt;
  
      &lt;TextView 
          android:id="@+id/textview"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:paddingTop="75sp"
          android:paddingBottom="75sp"
          android:gravity="center"
          android:textSize="20sp"
          android:textColor="@android:color/white" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>But my out put is not like what i needed. I needed vertical padding of text which i given in adapter textview in XML.</p>
  
  <p>My out put is: </p>
  
  <p><img src="https://i.stack.imgur.com/ZI7pv.png" alt="output"></p>
  
  <p>I need space from top and bottem of text in text view which is in adapter of list view.</p>
  
  <p>I tried from .java file also as :</p>
  
  <pre><code>textView.setPadding(0, 75, 0, 75);
  </code></pre>
  
  <p>but of no use.</p>
  
  <p>I need output like :</p>
  
  <p><img src="https://i.stack.imgur.com/MMIq8.png" alt="enter image description here"></p>
  
  <p>Please guide me what should i do now.</p>