When I load data to the spinner from web service using Retrofit, It increase the height of the spinner and change text color. What is the problem? How can I fix it?
Red marked spinner is the standard size without loading any data.
Layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_monthly_target_ad"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.nitolniloygroup.operating.view.activity.MonthlyTargetADActivity">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true">
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="@android:drawable/btn_dropdown"
android:textColor="@android:color/holo_blue_bright"
android:id="@+id/spinnerZone" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="@android:drawable/btn_dropdown"
android:textColor="@android:color/holo_blue_bright"
android:id="@+id/spinnerSubZone" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="@android:drawable/btn_dropdown"
android:textColor="@android:color/holo_blue_bright"
android:id="@+id/spinnerBranch" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="@android:drawable/btn_dropdown"
android:textColor="@android:color/holo_blue_bright"
android:id="@+id/spinnerFieldOfficer" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="@android:drawable/btn_dropdown"
android:textColor="@android:color/holo_blue_bright"
android:id="@+id/spinnerFieldOfficeraaa" />
<Button
android:text="Search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/btn_default"
android:onClick="onClickSearch"
android:id="@+id/button4" />
</LinearLayout>
</RelativeLayout>