[英]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.