Can we have search widget other than toolbar in android -
i understand can have search widget in activity toolbar. per requirement can't use tool bar search widget, possible can have search widget separate entity in activity below tool bar or want (just text view or button)?
i have created search view xml , use including want.
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/colorprimary" android:padding="16dp"> <android.support.v7.widget.cardview android:layout_width="match_parent" android:layout_height="wrap_content" app:cardbackgroundcolor="@android:color/white" app:cardelevation="4dp"> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <android.support.v7.widget.searchview android:id="@+id/searchview" android:layout_width="match_parent" android:layout_height="wrap_content" android:queryhint="search.."> </android.support.v7.widget.searchview> </linearlayout> </android.support.v7.widget.cardview> </linearlayout>
to include in layout
<include layout="@layout/search_view" />
Comments
Post a Comment