I am trying to use SearchView in my layout (not inside ToolBar or ActionBar).
<FrameLayout android:layout_width="0dp" android:layout_weight="50" android:layout_height="wrap_content" > <android.support.v7.widget.SearchView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|left" style="@style/MySearchViewStyle" /> </FrameLayout>
I use AppCompat, but it looks different on pre-lollipop. EditText does not have a lower bound on devices with pretreatment.
Lollipop Search displays the border correctly: 
A pre-Lellip search shows a NO border: 
My main topic:
<style name="Theme.Base" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="android:windowNoTitle">true</item> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="searchViewStyle">@style/MySearchViewStyle</item> <item name="android:searchViewStyle">@style/MySearchViewStyle</item> <item name="colorPrimary">@color/primary</item> <item name="colorPrimaryDark">@color/primary_dark</item> <item name="colorAccent">@color/accent</item> </style> <style name="MySearchViewStyle" parent="Widget.AppCompat.SearchView"> <item name="android:editTextStyle">@style/EditText</item> <item name="editTextStyle">@style/EditText</item> </style> <style name="EditText"> <item name="android:layout_height">wrap_content</item> <item name="android:layout_width">wrap_content</item> <item name="android:inputType">text</item> <item name="android:cursorVisible">true</item> <item name="android:maxLength">1000</item> <item name="android:selectAllOnFocus">true</item> <item name="android:paddingTop">4dp</item> </style>
Any help to ensure that my styles are consistent will be greatly appreciated.
Daisy source share