---
title: "android 键盘 搜索键"
author: "liangoogle"
date: "2013-04-15T16:52:04Z"
tags: []
categories: ["移动开发"]
slug: "android"
draft: false
lastmod: "2013-04-16T18:49:56Z"
id: 1847729
url: "https://liangoogle.iteye.com/blog/1847729"
---

想让软键盘上的enter键显示搜索图标：             

xml中设置：

               android:imeOptions="actionSearch"  
                android:inputType="text"

.java中：

               mQueryTextView.setImeOptions（EditorInfo.IME\_ACTION\_SEARCH）；//显示搜索图标。

               mQueryTextView.setInputType(EditorInfo.TYPE\_CLASS\_TEXT);