简体   繁体   English

带有Theme.AppCompat.Light.DarkActionBar的ActionBar微调框深色文本

[英]ActionBar Spinner dark text with Theme.AppCompat.Light.DarkActionBar

I am using a custom BaseAdapter with the following getView() method: 我正在通过以下getView()方法使用自定义BaseAdapter

@Override
    public View getView(int position, View convertView, ViewGroup parent) {
        LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        if(getItemViewType(position) == VIEW_TYPE_HEADER) {
            convertView = inflater.inflate(R.layout.actionbarspinner_header, parent, false);
        } else {
            convertView = inflater.inflate(android.R.layout.simple_dropdown_item_1line, parent, false);
            assert convertView != null;
            TextView textView = (TextView) convertView.findViewById(android.R.id.text1);
            textView.setText("Manage stores");
            textView.setTextColor(0xffffff);
        }
        return convertView;
    }

And even though I force the text color to show white (I have tried without forcing it), it looks like this: 即使我强制文本颜色显示为白色(我尝试过不强制使用),它看起来也是如此:

在此处输入图片说明

textView.setTextColor(0xffffff); sets the text to transparent white. 将文本设置为透明白色。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Theme.AppCompat.Light.DarkActionBar提供黑色操作栏标题文本 - Theme.AppCompat.Light.DarkActionBar giving black actionbar title text 使用Theme.AppCompat.Light.DarkActionBar时不显示ActionBar - ActionBar does not appear when using Theme.AppCompat.Light.DarkActionBar Theme.AppCompat.Light.DarkActionBar导致没有显示ActionBar - Theme.AppCompat.Light.DarkActionBar results in no ActionBar showing 带有Theme.AppCompat.Light.DarkActionBar的ActionBarCompat显示白色标题文本但黑色微调文本 - ActionBarCompat with Theme.AppCompat.Light.DarkActionBar shows white title text but black spinner text Theme.AppCompat.Light.DarkActionBar的默认文本颜色是什么? - What is the default text color for Theme.AppCompat.Light.DarkActionBar? 找不到资源 - Theme.AppCompat.Light.DarkActionBar - No resource found - Theme.AppCompat.Light.DarkActionBar Theme.AppCompat.Light.DarkActionBar - 找不到资源 - Theme.AppCompat.Light.DarkActionBar - No resource found 使用Theme.AppCompat.Light.DarkActionBar时如何删除操作栏上方的白条 - How to remove white bar above actionbar when using Theme.AppCompat.Light.DarkActionBar 将android:Theme.Light更改为Theme.AppCompat.Light.DarkActionBar - change android:Theme.Light to Theme.AppCompat.Light.DarkActionBar 如何在Theme.AppCompat.Light.DarkActionBar主题中更改菜单项的文本颜色? - How to change the text color of a menu item in Theme.AppCompat.Light.DarkActionBar theme?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM