Spinner werden nicht ausgeblendet, wenn sie aus irgendeinem Grund die Grenzen der Bildlaufansicht überschreiten. Ich weiß, dass das Problem mit dem appcompat Spinner ist, weil ich andere Widgets (wie Spinner des rey5137) probierte, und sie arbeiten tadellos gut mit der Rolleansicht. HierSpinner nicht ausblenden ina ScrollView
ist der Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.spinners.MainActivity">
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content"
android:textSize="30sp"
android:text="YOU SHALL NOT PASS !!!"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="300dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="ReySpinner:"/>
<com.rey.material.widget.Spinner
android:layout_width="200dp"
android:layout_height="30dp"
app:spn_dividerColor="@color/colorAccent"
style="@style/Material.Widget.Spinner"
app:rd_style="@style/Material.Drawable.Ripple.Wave"
/>
</LinearLayout>
<!-- spamming the same spinner layout above -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="5dp"
android:text="NormalSpinner:"/>
<Spinner
android:layout_width="200dp"
android:layout_height="30dp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
Hier pic von dem, was los ist: The issue