在manifest的activity節點使用
<activity android:windowSoftInputMode="adjustResize" . . . >
當點擊EditText控件彈出軟鍵盤的時候,系統會自動調整控件的位置。
代碼
http://github.com/shaobin0604/miscandroidapps/tree/master/WindowSoftInputMode/
參考