Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>While Creating Adapter for your Spinner give custom layout instead of predefined one</p> <p>Create xml named <code>spinner_row.xml</code> (Any name of your choice) in <code>res/layout</code> folder</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/cust_view" android:layout_width="match_parent" android:textColor="@color/black" android:textSize="32sp" android:layout_height="36dp" android:gravity="left|center_vertical"/&gt; </code></pre> <p>Here you can change the color Text size and width ,height and spacing by setitng the margin and padding of the Elements in the spinner by modifying this <code>textview</code></p> <p>Use it like this while creating Adapter</p> <pre><code> ArrayAdapter&lt;String&gt; adapter=new ArrayAdapter&lt;String&gt;(context, R.layout.spinner_row,yourlist); </code></pre> <p>The Last task is routine </p> <pre><code>spinner.setAdapter(adapter); </code></pre> <p>I hope this will help you.</p> <hr> <p>second way,</p> <p>create a style like this withe attributes of your choice, like test size, padding etc And your style should have a parent <code>parent="@android:style/Widget.TextView.SpinnerItem"</code> as shown in the below style</p> <pre><code>&lt;style name="spinnerStyleView" parent="@android:style/Widget.TextView.SpinnerItem"&gt; &lt;item name="android:background"&gt; @drawable/notetvbg&lt;/item&gt; &lt;item name="android:textColor"&gt;@android:color/darker_gray&lt;/item&gt; &lt;/style&gt; </code></pre> <p>And apply style to your spinner by using style attribue</p> <pre><code> style="@style/spinnerStyleView" </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload