您好我有一个编辑文本用于获取有关user.i的信息已设置以下属性以编辑文本
<EditText
android:id="@+id/profile_about"
android:layout_below="@id/AboutYou"
android:layout_centerInParent="true"
android:layout_marginLeft="8dip"
android:layout_marginBottom="10dip"
android:layout_marginRight="18dip"
android:gravity="top|left"
android:inputType="textCapWords"
android:textColor="#000000"
android:background="@drawable/edittext"
android:layout_width="300dip"
android:layout_height="100dip"
android:textSize="16sp"
/>
问题是它只是水平滚动。输入某些字符后不要换行。有人帮我吗?
答案 0 :(得分:3)
我将android:inputType="textCapWords"
替换为android:inputType="textMultiLine|textCapWords"
,并且有效。
答案 1 :(得分:0)
尝试使用android:singleLine="false"
答案 2 :(得分:0)
机器人:SINGLELINE = “假” 如果设置了此属性,则某个限制后的字符将自动转到下一行... 试试这个android:滚动水平=“假”