Text color of SearchView in ActionBar with ActionBarSherlock

前端 未结 2 1208
面向向阳花
面向向阳花 2021-01-14 01:17

I want to change the color of a text in an ActionBarSherlock SearchView, so I found this on StackOverflow:

AutoCompleteTextView searchText = (Au         


        
2条回答
  •  天涯浪人
    2021-01-14 02:08

    other way, work for me

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
            searchView = new SearchView(getSupportActionBar().getThemedContext());
    
            AutoCompleteTextView searchText = (AutoCompleteTextView) searchView.findViewById(R.id.abs__search_src_text);
            searchText.setTextColor(Color.BLACK); 
    .....................
    }
    

提交回复
热议问题