سؤال

I am using a custom BaseAdapter with the following getView() method:

@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:

enter image description here

هل كانت مفيدة؟

المحلول

textView.setTextColor(0xffffff); sets the text to transparent white.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top