---
title: "acitvitygroup edittext   软盘弹出时 底部菜单挤压到上面的问题"
author: "liangoogle"
date: "2012-03-31T17:28:02Z"
tags: []
categories: ["移动开发"]
slug: "acitvitygroup-edittext"
draft: false
lastmod: "2012-03-31T17:28:02Z"
id: 1471800
url: "https://liangoogle.iteye.com/blog/1471800"
---

userName = (EditText) layout.findViewById(R.id.username);  
  //TODO 显示软盘 使用EditText的getContext  
   InputMethodManager imm = (InputMethodManager)userName.getContext(). getSystemService(Context.INPUT\_METHOD\_SERVICE);  
        imm.toggleSoftInput(0, InputMethodManager.HIDE\_NOT\_ALWAYS);