int searchPlateId = getActivity().getResources().getIdentifier("android:id/search_plate", null, null);
View searchPlate = v.findViewById(searchPlateId);
searchPlate.setBackgroundColor(Color.WHITE);
// SearchView 里的 TextView
int searchSrcTextId = getResources().getIdentifier("android:id/search_src_text", null, null);
TextView searchEditText = (TextView) searchPlate.findViewById(searchSrcTextId);
searchEditText.setTextSize(13);
searchEditText.setGravity(Gravity.BOTTOM|Gravity.LEFT);

 

 

mSearchButton = findViewById(R.id.search_button); mSearchEditFrame = findViewById(R.id.search_edit_frame); mSearchPlate = findViewById(R.id.search_plate); mSubmitArea = findViewById(R.id.submit_area); mSubmitButton = findViewById(R.id.search_go_btn); mCloseButton = (ImageView) findViewById(R.id.search_close_btn); mVoiceButton = findViewById(R.id.search_voice_btn); mSearchHintIcon = (ImageView) findViewById(R.id.search_mag_icon);

 

http://nlopez.io/how-to-style-the-actionbar-searchview-programmatically/

http://www.techrepublic.com/blog/software-engineer/pro-tip-customize-the-android-search-view-widget/

 

相关文章:

  • 2022-02-21
  • 2022-12-23
  • 2021-08-20
  • 2021-12-14
  • 2021-09-13
  • 2021-08-25
  • 2021-09-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-11
  • 2022-01-27
  • 2021-08-01
相关资源
相似解决方案