---
title: "Android软键盘相关"
author: "小建枫叶"
date: "2012-04-24T08:42:41Z"
tags: []
categories: ["移动开发"]
slug: "android"
draft: false
lastmod: "2012-04-24T08:42:41Z"
id: 1495905
url: "https://smallmaple.iteye.com/blog/1495905"
---

隐藏软件盘代码:

```
	((InputMethodManager)getSystemService(INPUT_METHOD_SERVICE))
		.hideSoftInputFromWindow(MainActivity.this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
```