title: Android Layout : Height of Linear layout not enough
body: <p>I am trying to design a layout in android which looks like following:</p>
  <pre><code>&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
          android:id=&quot;@+id/linear&quot;
      android:layout_height=&quot;match_parent&quot;
  
          android:layout_width=&quot;match_parent&quot; &gt;
  
  
  
      &lt;LinearLayout
  
          android:id=&quot;@+id/LinearLayout_bt&quot;
  
          android:layout_width=&quot;fill_parent&quot;
  
          android:layout_height=&quot;wrap_content&quot;
  
          android:layout_gravity=&quot;center&quot;
  
          android:background=&quot;@drawable/sec_bluetooth_listview_background&quot;
  
  
          android:paddingTop=&quot;@*android:dimen/tw_preference_item_padding_top&quot;
  
          android:paddingBottom=&quot;@*android:dimen/tw_preference_item_padding_bottom&quot;
  
          android:orientation=&quot;vertical&quot; &gt;
  
  
  
          &lt;TextView
  
              android:id=&quot;@+id/main_text&quot;
              android:textAppearance=&quot;?android:attr/textAppearanceListItem&quot;
              android:textColor=&quot;?android:attr/textColorPrimary&quot;
  
              android:layout_width=&quot;wrap_content&quot;
  
              android:layout_height=&quot;wrap_content&quot;
  
              android:layout_gravity=&quot;center&quot;
  
              android:gravity=&quot;center&quot;
  
              android:singleLine=&quot;false&quot;
  
              android:text=&quot;@string/sec_bluetooth_no_devices_found&quot;
  
              android:ellipsize=&quot;none&quot; /&gt;
  
  
  
          &lt;TextView
  
              android:id=&quot;@+id/secondary_text&quot;
  
              style=&quot;@style/BluetoothNoItemHelpText&quot;
  
              android:layout_width=&quot;wrap_content&quot;
  
              android:layout_height=&quot;wrap_content&quot;
  
              android:layout_gravity=&quot;center&quot;
  
              android:gravity=&quot;start&quot;
  
              android:singleLine=&quot;false&quot;
  
              android:lineSpacingExtra=&quot;4sp&quot;
  
              android:ellipsize=&quot;none&quot; /&gt;
  
  
  
      &lt;/LinearLayout&gt;
  
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  <p>But the problem is that it is not  showing top padding but only bottom padding is working i.e. <code>textview</code> is showing in layout without top padding . I guess there is some problem in height of linear layout but I have set it to <code>wrap-content</code>. Is there any problem in my layout?</p>