background-drawable

How to fix cut-off custom SearchView background in landscape?

心不动则不痛 提交于 2019-12-07 05:46:44
问题 I've followed the great answer for this question to make the SearchView widget in my ActionBar fit a custom theme. It works just fine for portrait mode, but in landscape the OS will shrink the height of the ActionBar to maximize content screen estate. Instead of fitting the SearchView widget without margins into the ActionBar just like the other items, it is chopped off at the top: I've dug through the res-folder of the Android source, but could not find any specialized layouts or resources

How to fix cut-off custom SearchView background in landscape?

不打扰是莪最后的温柔 提交于 2019-12-05 12:37:26
I've followed the great answer for this question to make the SearchView widget in my ActionBar fit a custom theme. It works just fine for portrait mode, but in landscape the OS will shrink the height of the ActionBar to maximize content screen estate. Instead of fitting the SearchView widget without margins into the ActionBar just like the other items, it is chopped off at the top: I've dug through the res-folder of the Android source, but could not find any specialized layouts or resources that would make obvious how to fix this or even how Android itself manages to fit the default Holo

Changing the background drawable of the searchview widget

℡╲_俬逩灬. 提交于 2019-11-26 03:21:24
问题 I\'m trying to change the drawable that sits in the Android actionbar searchview widget. Currently it looks like this: but I need to change the blue background drawable to a red colour. I\'ve tried many things short of rolling my own search widget, but nothing seems to work. Can somebody point me in the right direction to changing this? 回答1: Intro Unfortunately there's no way to set SearchView text field style using themes, styles and inheritance in XML as you can do with background of items