Code example for TextView

Methods: setTextColor

0
 
    //can't find a public theme attr to modify actionbar searchview text color 
    public static void customActionBarSearchViewTextColor(SearchView searchView) {
        int id = searchView.getContext().getResources().getIdentifier("android:id/search_src_text", null, null);
        TextView textView = (TextView) searchView.findViewById(id);
        textView.setTextColor(Color.WHITE);
 
    } 
 
}