Skip to content

Commit

Permalink
feat(android): deprecate underlineColorAndroid prop
Browse files Browse the repository at this point in the history
  • Loading branch information
iPel committed Nov 24, 2023
1 parent fe9feda commit ee38f43
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 18 deletions.
1 change: 0 additions & 1 deletion docs/api/hippy-react/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ import icon from './qb_icon_new.png';
| placeholder | 如果没有任何文字输入,会显示此字符串。 | `string` | `Android、iOS、hippy-react-web、Web-Renderer、Voltron` |
| placeholderTextColor | 占位字符串显示的文字颜色。(也可设置为 Style 属性)`最低支持版本2.13.4` | [`color`](api/style/color.md) | `Android、iOS、Web-Renderer、Voltron` |
| returnKeyType | 指定软键盘的回车键显示的样式。(其中部分样式仅`multiline=false`时有效) | `enum (done, go, next, search, send)` | `Android、iOS、Web-Renderer、Voltron` |
| underlineColorAndroid | `TextInput` 下底线的颜色。 可以设置为 'transparent' 来去掉下底线。(也可设置为 Style 属性) | [`color`](api/style/color.md) | `Android` |
| value | 指定 `TextInput` 组件的值。 | `string` | `Android、iOS、hippy-react-web、Web-Renderer、Voltron` |
| autoFocus | 组件渲染时自动获得焦点。 | `boolean` | `Android、iOS、hippy-react-web、Web-Renderer、Voltron` |
| breakStrategy* | 设置Android API 23及以上系统的文本折行策略。`default: simple` | `enum(simple, high_quality, balanced)` | `Android(版本 2.14.2以上)` |
Expand Down
1 change: 0 additions & 1 deletion docs/api/hippy-vue/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@
| numberOfLines | 设置 `input` 最大显示行数,如果 `input` 没有显式设置高度,会根据 `numberOfLines` 来计算高度撑开。在使用的时候必需同时设置 `multiline` 参数为 `true`| `number` | `Android、Voltron、Web-Renderer` |
| placeholder | 如果没有任何文字输入,会显示此字符串。 | `string` | `Android、iOS、Web-Renderer、Voltron` |
| placeholder-text-color | 占位字符串显示的文字颜色。(也可设置为 Style 属性) `最低支持版本2.13.4` | [`color`](api/style/color.md) | `Android、iOS、Web-Renderer、Voltron` |
| underline-color-android | `input` 下底线的颜色。 可以设置为 'transparent' 来去掉下底线。(也可设置为 Style 属性) `最低支持版本2.13.4` | [`color`](api/style/color.md) | `Android` |
| returnKeyType | 指定软键盘的回车键显示的样式。(其中部分样式仅对单行文本组件有效) | `enum(done, go, next, search, send)` | `Android、iOS、Web-Renderer` |
| value | 指定 `input` 组件的值。 | `string` | `Android、iOS、Web-Renderer、Voltron` |
| break-strategy* | 设置Android API 23及以上系统的文本换行策略。`default: simple` | `enum(simple, high_quality, balanced)` | `Android(版本 2.14.2以上)` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public HippyTextInput(Context context) {
ViewGroup.LayoutParams.MATCH_PARENT));
setPadding(0, 0, 0, 0);
setGravityVertical(Gravity.CENTER_VERTICAL);
setBackground(null);
}

@Override
Expand Down Expand Up @@ -472,16 +473,6 @@ public void afterTextChanged(Editable s) {
}
}

@Override
public void setBackgroundColor(int color) {
int paddingBottom = getPaddingBottom();
int paddingTop = getPaddingTop();
int paddingLeft = getPaddingLeft();
int paddingRight = getPaddingRight();
// Android这个EditText控件默认带有内边距,设置背景时系统也可能会再把它默认的内边距给加上去。这里强制去掉内边距
setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom);
}

@Override
public NativeGestureDispatcher getGestureDispatcher() {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,6 @@ public void setMaxLines(HippyTextInput input, int numberOfLine) {
input.setMaxLines(numberOfLine);
}


@HippyControllerProps(name = "underlineColorAndroid", defaultType = HippyControllerProps.NUMBER, defaultNumber = Color.TRANSPARENT)
public void setUnderlineColor(HippyTextInput hippyTextInput, int underlineColor) {
//hippyTextInput.setUnderlineColor(underlineColor);
}

@HippyControllerProps(name = "changetext", defaultType = HippyControllerProps.BOOLEAN)
public void setOnChangeText(HippyTextInput hippyTextInput, boolean change) {
hippyTextInput.setOnChangeListener(change);
Expand Down

0 comments on commit ee38f43

Please sign in to comment.