码迷,mamicode.com
首页 > 其他好文 > 详细

SearchView 分解设置属性

时间:2014-12-03 07:02:20      阅读:411      评论:0      收藏:0      [点我收藏+]

标签:android   style   blog   http   io   ar   color   os   sp   

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/

 

SearchView 分解设置属性

标签:android   style   blog   http   io   ar   color   os   sp   

原文地址:http://www.cnblogs.com/Ringer/p/4139027.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!