8种机械键盘轴体对比
本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选?
用惯了iOS的各位在开发安卓程序或者使用安卓手机时,都会遇到这样一个问题:原本在iOS上都是回车输入,而到了Android上却需要点击按钮完成输入(对比两个系统上的QQ就发现了)。我一直在使用iOS系统,因为《软设》才着手Android开发,所以我就想能不能像iOS上的那样实现一个输入框+回车符完成输入呢?经过我查找资料,发现确实可以:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16<?xml version="1.0" encoding="utf-8"?>
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
android:id="@+id/edit_message"
android:layout_margin="30dp"
android:layout_width="match_parent"
android:layout_height="80dp"
android:hint="请输入文本信息 ..."
android:imeOptions="actionSearch"
android:singleLine="true"/>
在EditText中加入了imeOptions就可以将回车符转变成各种各样的功能: actionDone——回车符–>完成 actionSend——回车符–>发送 actionGo——回车符–>前进 actionNext——回车符–>下一项 actionNone——回车符–>无动作 actionPrevious——回车符–>上一项 actionSearch——回车符–>搜索 actionUnspecified——回车符–>未指定
actionSend——回车符–>发送 又查阅资料发现:ime是Input Method Editors的缩写,也就是输入法编辑器,原来如此,不过想使用这个属性,必须加上android:inputType 或者 android:singleline=”true” 至此,就完成了Android回车符向iOS的转化!