title: Why dropdown item width is larger than spinner width in android?
body: <p>I have developed a custom spinner but my spinner dropdown item is showing larger than spinner background. It is very embarrassing for users. I tried many things but I can't figure out what is the problem behind this. Could anyone help me regarding this issue. Here is the spinner and dropdown list item layout. </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="horizontal"&gt;
  
      &lt;TextView
          android:id="@android:id/title"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_weight=".36"
          android:paddingLeft="@dimen/spinner_title_padding_left"
          android:paddingTop="@dimen/spinner_title_padding_top"
          android:paddingBottom="@dimen/spinner_tittle_padding_bottom"
          android:maxLength="@integer/spinner_title_max_length"
          android:singleLine="true" /&gt;
  
      &lt;TextView
          android:id="@android:id/text1"
          android:layout_width="0dp"
          android:layout_weight=".64"
          android:layout_height="wrap_content"
          android:paddingRight="@dimen/spinner_text_padding_right"
          android:paddingLeft="@dimen/spinner_title_padding_left"
          android:paddingTop="@dimen/spinner_text_padding_top"
          android:paddingBottom="@dimen/spinner_text_padding_bottom"
          android:gravity="center"
          android:maxLength="@integer/spinner_text_max_length"
          android:ellipsize="end"
          android:singleLine="true" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here is the output <img src="https://i.stack.imgur.com/8V1e8.png" alt="enter image description here"></p>