Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

1.how can i get SearchView left,right,bottom,.. positions when it is expanded in Action Bar,and i am getting the values in normal position.

2.how can give my list of words as search suggestions for a searchview.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
147 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can use android:layout_centerInParent="true" to put searchview in center

<item  android:id="@+id/action_search"
    android:layout_centerInParent="true"
    android:actionViewClass="android.widget.SearchView"
    android:icon="@drawable/search_main"
    android:iconifiedByDefault="false"
    android:title="Search"/>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...