替換searchView 搜索圖標與改變字體大小

SearchManager searchManager = (SearchManager) getActivity().getSystemService(Context.SEARCH_SERVICE);
SearchView searchView = (SearchView) menu.findItem(R.id.ab_search).getActionView();
ImageView search_button = (ImageView) searchView.findViewById(android.support.v7.appcompat.R.id.search_button);
search_button.setImageResource(R.mipmap.search_icon);
//獲取到TextView的控件
TextView textView = (TextView) searchView.findViewById(android.support.v7.appcompat.R.id.search_src_text);
//設置字體大小爲14sp
textView.setTextSize
相關文章
相關標籤/搜索