Android微调器项目在滚动期间消失

Android微调器项目在滚动期间消失,android,android-arrayadapter,android-spinner,Android,Android Arrayadapter,Android Spinner,我已经创建了两个微调器,但当我向适配器添加自定义布局时,在滚动过程中,一些项目会消失 xml文件: <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_conte

我已经创建了两个微调器,但当我向适配器添加自定义布局时,在滚动过程中,一些项目会消失

xml文件:

<?xml version="1.0" encoding="utf-8"?>


<TextView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textSize="25sp"
    android:padding="20sp"
    android:textColor="#000000"
    android:textAlignment="center"/>

java文件:

    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.spinner_text, list);
    spinner.setAdapter(adapter);

    ArrayAdapter<String> adapter2 = new ArrayAdapter<String>(this, R.layout.spinner_text, list2);
    spinner2.setAdapter(adapter2);
ArrayAdapter=新的ArrayAdapter(这个,R.layout.spinner\u文本,列表);
旋转器。设置适配器(适配器);
ArrayAdapter adapter2=新的ArrayAdapter(这个,R.layout.spinner\u text,列表2);
喷丝头2.设置适配器(适配器2);

如何解决此问题?

当应用程序支持多种语言时,可能会出现这种情况,不同的语言需要不同的布局方向

尝试将android:layoutDirection添加到自定义微调器项目布局中的文本视图中,这将得到修复