一、如果希望输入法键盘弹出时不自动向上挤压activity,在activty中设置属性android:windowSoftInputMode="adjustPan"即可。
<activity android:name="testActivity"
android:windowSoftInputMode="adjustPan">
二、在项目的AndroidManifest.xml文件中界面对应的<activity>里加入android:windowSoftInputMode="stateVisible|adjustResize",这样会让屏幕整体上移
三、希望输出的是纯数字键盘:
<style name="editFont" parent="@android:style/TextAppearance.Widget.EditText"> <item name="android:layout_width">fill_parent</item> <item name="android:layout_height">wrap_content</item> <item name="android:textColor">@color/black</item> <item name="android:textSize">18dp</item> <item name="android:singleLine">true</item> <item name="android:numeric">integer</item> <item name="android:digits">1234567890.</item> </style>
直接给EditText设置stysle即可