智能客服
你问我答,随时在线为你解决问题

























您当前正在浏览HarmonyOS开发者3.0版本配套的开发者文档,对应API能力级别为API 8 Release。此版本文档已归档不再维护,推荐您使用HarmonyOS NEXT版本。
| |---ohos.miscservices.inputmethod.EditingCapability 收起 自动换行 深色代码主题 复制 |
This class describes the attributes of the text that an input method expects to obtain from an application. The text is transferred from the edit box of the application to the input method. The text attributes include the maximum number of lines and maximum number of characters in the text.
Since:
3Nested classes/interfaces inherited from interface ohos.utils.Sequenceable |
|---|
Constructor | Description |
|---|---|
Modifier and Type | Method | Description |
|---|---|---|
int | getMaxChars() | Obtains the maximum number of characters in the text. |
int | getMaxLines() | Obtains the maximum number of lines in the text. |
boolean | marshalling(Parcel out) | Marshals this Sequenceable object into a Parcel. |
void | setMaxChars(int maxChars) | Sets the maximum number of characters in the text. |
void | setMaxLines(int maxLines) | Sets the maximum number of lines in the text. |
boolean | unmarshalling(Parcel in) | Unmarshals this Sequenceable object from a Parcel. |
Methods inherited from interface ohos.utils.Sequenceable |
|---|
public EditingCapability()
public boolean marshalling(Parcel out)
Description copied from interface: SequenceableMarshals this Sequenceable object into a Parcel.
Specified by:
marshalling in interface Sequenceable
Parameters:
Parameter Name | Parameter Description |
|---|---|
out | Indicates the Parcel object to which the Sequenceable object will be marshaled.. |
Returns:
Returns true if the marshalling is successful; returns false otherwise.
public boolean unmarshalling(Parcel in)
Description copied from interface: SequenceableUnmarshals this Sequenceable object from a Parcel.
Specified by:
unmarshalling in interface Sequenceable
Parameters:
Parameter Name | Parameter Description |
|---|---|
in | Indicates the Parcel object into which the Sequenceable object has been marshaled. |
Returns:
Returns true if the unmarshalling is successful; returns false otherwise.
public int getMaxLines()
Obtains the maximum number of lines in the text.This method obtains the maximum number of text lines that the component should return, as suggested by the input method.
Returns:
Returns the maximum number of lines in the text.
Since:
3
public void setMaxLines(int maxLines)
Sets the maximum number of lines in the text.Parameters:
Parameter Name | Parameter Description |
|---|---|
maxLines | Indicates the maximum number of lines to set. The value is a positive integer. |
Since:
3
public int getMaxChars()
Obtains the maximum number of characters in the text.This method obtains the maximum number of characters that the component should return, as suggested by the input method.
Returns:
Returns the maximum number of characters in the text.
Since:
3
public void setMaxChars(int maxChars)
Sets the maximum number of characters in the text.Parameters:
Parameter Name | Parameter Description |
|---|---|
maxChars | Indicates the maximum number of characters to set. The value is a positive integer. |
Since:
3
智能客服
你问我答,随时在线为你解决问题
合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
解决方案
精准高效的一站式服务支持,助力开发者商业成功