答案 0 :(得分:4)
想象一下,SearchView
名为searchBar
SearchView searchBar = (SearchView) findViewById(R.id.searchViewBar);
获取包含AutoCompleteTextView
内文字的视图(SearchView
):
//The view that contains the SearchView text
AutoCompleteTextView searchTextContent = (AutoCompleteTextView) searchBar.findViewById(searchBar.getContext().getResources().getIdentifier("android:id/search_src_text", null, null));
searchTextContent.setTextSize(15); //Set the text size
searchTextContent.setGravity(Gravity.BOTTOM); //Set its gravity to bottom
您可以使用AutoCompleteTextView方法(如setHeight(),setPadding()等)来操作此视图。更多信息here。