开源软件名称(OpenSource Name):nadsonfernando/input-materialdesign-widget开源软件地址(OpenSource Url):https://github.com/nadsonfernando/input-materialdesign-widget开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):input-materialdesign-widgetAppcelerator TextField Material Design concept! This is a widget based on Material Design concept, which works for iphone, ipad and android, even Android. InstallationUse Gittio to install: $ gittio install input-materialdesign@version UsageIt is quite simple to create a widget, just declare your widget in the xml, with only a property called 'titleHint' and is ready to use. You choose to collocate the attributes either in the 'xml' file in question or in the 'tss' file (recommended) to maintain a cohesion and responsibility for each layer. This component is well decoupled, being able to stylize and interact with it Below you will see some examples. Simple input<Widget src="input-materialdesign" id="textfieldTest"/>
Input with character counterInput with character counter, the maximum number of characters is set, when the component exceeds, the component shows an error notification. <Widget src="input-materialdesign" id="textfieldTest" />
Input with required fieldsWhen a field is orbit.
Input with validation email and numberIt is possible to validate if the field typed is an email or a valid number through the 'maskType' attribute (email, number).
|
Functions | Description |
---|---|
getValue |
Returns the value of input |
setValue |
Assigns value to input |
setEditable |
The input block |
focus |
Gives focus on field |
blur |
Take the focus away from the camera |
ANIMATION_UP |
Animation rise |
ANIMATION_DOWN |
Animation descent |
listener(event, callback) |
Assigns event for input , listening to a callback |
clickIconAction(callback) |
IconAction's click return function |
setPasswordMask(value) |
Defines whether the field will show or hide the characters |
setIconAction(value) |
Defines action icon |
setEditable(value) |
Defines whether the component will be locked or not |
There are all attributes supporting by this widget.
Attributes | type | Description |
---|---|---|
animationDuration |
Number | Duration animation |
width |
String, Number | Sets the width |
colorFocus |
String | Sets the color when the focused field |
colorDefault |
String | Sets the standard color when the field started |
colorFont |
String | Sets the font color |
titleHint |
String | Sets title |
top |
String, Number | Defines the top |
bottom |
String, Number | Defines the bottom |
left |
String, Number | Defines the left |
right |
String, Number | Defines the right |
keyboardType |
String | Defines the keyboardType |
returnKey |
String | Defines the returnKey from keyboard |
password |
String | Defines if TextField should have passwordMask |
editable |
Boolean | Defines whether the input starts blocked |
maxLength |
Number | Defines the maximum number of characters |
minLength |
Number | Defines the minimum number of characters |
exceedingColor |
String | Set the color when it exceeds the reported number of characters |
toUpperCase |
Boolean | Sets the field to get me high box |
maskType ['number' or 'email'] |
String | Defines whether some shade to the field, as there is no default , but can be defined as numeric, accepting only numbers, or you can spend a regular expression whatsoever. |
maskTypeDescription |
String | Description of the alert |
required |
String | Defines whether the field is required , passing a message as parameter |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论