带底部和顶部边框的微调框下拉菜单

问题描述

所以我试图填充一个微调框下拉列表,但是我所获得的颜色有问题。

这是我的微调代码:

<?xml version="1.0" encoding="utf-8"?>
<TextView
 xmlns:android="http://schemas.android.com/apk/res/android"
 android:id="@android:id/text1"
 android:singleLine="true"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
 android:padding="10dp"
 android:textColor="@color/white"
 android:textSize="@dimen/input_text"
 android:background="@drawable/abc_spinner_mtrl_am_alpha"/>

然后我的下拉菜单在这里:

<?xml version="1.0" encoding="utf-8"?>
<TextView
 xmlns:android="http://schemas.android.com/apk/res/android"
 android:id="@android:id/text1"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
 android:padding="15dp"
 android:textColor="@color/white"
 android:background="@color/clickable_bg"
 android:textAlignment="center"/>

适配器分配的Java代码在这里:

ArrayAdapter<String> adapter = new ArrayAdapter(
            this,R.layout.custom_spinner,getResources().getStringArray(R.array.muscle_groups)
    );

adapter.setDropDownViewResource(R.layout.custom_spinner_dropdown);
spinner.setAdapter(adapter);

我得到的是以下内容:

Current Dropdown

我不想有那些白色的顶部和底部边框。我该怎么办?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...