A HMOS library which provies Edittext with hint animation
Inspired by cctanfujun/HintAnim-EditText - version 0.1
This library provides an animation of hint for EditText.
- For using hintanimedittext module in sample app, include the source code and add the below dependencies in entry/build.gradle to generate hap/support.har.
dependencies {
implementation project(':hintanimedittext')
implementation fileTree(dir: 'libs', include: ['*.har'])
testImplementation 'junit:junit:4.13'
}
- For using hintanimedittext in separate application using har file, add the har file in the entry/libs folder and add the dependencies in entry/build.gradle file.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.har'])
testImplementation 'junit:junit:4.13'
}
- For using hintanimedittext from a remote repository in separate application, add the below dependencies in entry/build.gradle file.
dependencies {
implementation 'dev.applibgroup:hintanimedittext:1.0.0'
testCompile 'junit:junit:4.13'
}
<com.xiaochendev.lib.HintAnimEditText
ohos:id="$+id:Email"
ohos:width="match_parent"
ohos:height="70vp"
ohos:element_left="$media:email"
ohos:background_element="#FFD5A6E0"
ohos:text_size="50vp"
ohos:input_enter_key_type="enter_key_type_search"
ohos:text_input_type="pattern_text"
ohos:multiple_lines="false"
ohos:bottom_margin="10vp"
/>
change hint with anim like this:
mEditText.changeHintWithAnim("XXX");
Note: you should use setHintString("xxx")
change hint without anim or changeHintWithAnim("XXX")
change hint with anim instead of EditText’s hint.
Copyright 2015 cctanfujun
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.