当动作条扩大搜索查看职位 [英] SearchView positions when expanded in ActionBar

查看:89
本文介绍了当动作条扩大搜索查看职位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1.how我可以得到搜索查看左,右,下,..位置时,它在操作栏扩大,我在正常位置得到的值

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可以给我的话作为搜索建议的列表,供搜索查看

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

推荐答案

您可以使用安卓layout_centerInParent =真正的把搜索查看在中心

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"/>

这篇关于当动作条扩大搜索查看职位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆