TextView getTextColors - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for TextView getTextColors method.

This code example shows how to use the following methods:getText, getTextColors, getTextSize
 
            new NotificationViewSearcher(n, context, new Predicate<View>() {
                public boolean apply(View view) {
                    if (view instanceof TextView) {
                        TextView tv = (TextView) view;
                        if (tv.getText().toString().startsWith(TEXT_SEARCH_PREFIX)) {
                            int textColour = tv.getTextColors().getDefaultColor();
                            TextAppearance appearance = new TextAppearance(textColour, tv.getTextSize()/displayMetrics.scaledDensity);
 
                            if (TEXT_SEARCH_TEXT.equals(tv.getText().toString())) {
                                textAppearance = appearance;
                            } else { 
                                titleAppearance = appearance;
                            } 
                            return !needToSearch(); 
                        } 
                    } 
                    return false; 
                } 
            }).search(); 
8
CodeRank

Related TextView getTextColors Questions & Answers:

getTextColors Method Overview
Gets the text colors for the different states (normal, selected, focused) of the TextView.
See Code Examples for other Android TextView Methods: