Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-14410] iOS/Android: Add missing hintText properties (Parity) #8224

Merged
merged 7 commits into from
Jul 20, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
TiC.PROPERTY_ENABLE_RETURN_KEY,
TiC.PROPERTY_FONT,
TiC.PROPERTY_HINT_TEXT,
TiC.PROPERTY_HINT_TEXT_ID,
TiC.PROPERTY_HINT_TEXT_COLOR,
TiC.PROPERTY_INPUT_TYPE,
TiC.PROPERTY_KEYBOARD_TYPE,
Expand Down Expand Up @@ -69,6 +70,13 @@ public TiUIView createView(Activity activity)
{
return new TiUIText(this, true);
}

@Override
protected KrollDict getLangConversionTable() {
KrollDict table = new KrollDict();
table.put(TiC.PROPERTY_HINT_TEXT, TiC.PROPERTY_HINT_TEXT_ID);
return table;
}

@Kroll.method
public Boolean hasText()
Expand Down
5 changes: 5 additions & 0 deletions android/titanium/src/java/org/appcelerator/titanium/TiC.java
Original file line number Diff line number Diff line change
Expand Up @@ -1551,6 +1551,11 @@ public class TiC
* @module.api
*/
public static final String PROPERTY_HINT_TEXT = "hintText";

/**
* @module.api
*/
public static final String PROPERTY_HINT_TEXT_ID = "hinttextid";

/**
* @module.api
Expand Down
27 changes: 27 additions & 0 deletions apidoc/Titanium/UI/AlertDialog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,15 @@ properties:
since: "5.4.0"
platforms: [iphone, ipad]

- name: loginhinttextid
summary: |
Key identifying a string from the locale file to use for the
[loginHintText](Titanium.UI.AlertDialog.loginHintText) property.
description: Only one of `loginHintText` or `loginhinttextid` should be specified.
type: String
since: "6.1.0"
platforms: [iphone, ipad]

- name: loginReturnKeyType
summary: Specifies the text to display on the keyboard `Return` key when this field is focused.
description: |
Expand Down Expand Up @@ -340,6 +349,15 @@ properties:
since: "5.4.0"
platforms: [iphone, ipad]

- name: passwordhinttextid
summary: |
Key identifying a string from the locale file to use for the
[passwordHintText](Titanium.UI.AlertDialog.passwordHintText) property.
description: Only one of `passwordHintText` or `hinttextid` should be specified.
type: String
since: "6.1.0"
platforms: [iphone, ipad]

- name: passwordReturnKeyType
summary: Specifies the text to display on the keyboard `Return` key when this field is focused.
description: |
Expand Down Expand Up @@ -383,6 +401,15 @@ properties:
since: "5.4.0"
platforms: [iphone, ipad]

- name: hinttextid
summary: |
Key identifying a string from the locale file to use for the
[hintText](Titanium.UI.AlertDialog.hintText) property.
description: Only one of `hintText` or `hinttextid` should be specified.
type: String
since: "6.1.0"
platforms: [iphone, ipad]

- name: persistent
summary: Boolean value indicating if the alert dialog should only be cancelled by user gesture or by hide method.
description: |
Expand Down
8 changes: 8 additions & 0 deletions apidoc/Titanium/UI/TextField.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,14 @@ properties:
type: String
default: The platform's default hint text color.

- name: hinttextid
summary: |
Key identifying a string from the locale file to use for the
[hintText](Titanium.UI.TextField.hintText) property.
description: Only one of `hintText` or `hinttextid` should be specified.
type: String
since: "6.1.0"

- name: inputType
summary: Input type to accept in the text field. Also influences the Keyboard type to display.
description: |
Expand Down
3 changes: 3 additions & 0 deletions iphone/Classes/TiUIAlertDialogProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ -(NSMutableDictionary*)langConversionTable
@"title",@"titleid",
@"ok",@"okid",
@"message",@"messageid",
@"hintText",@"hinttextid",
@"loginHintText",@"loginhinttextid",
@"passwordHintText",@"passwordhinttextid",
nil];
}

Expand Down
5 changes: 5 additions & 0 deletions iphone/Classes/TiUITextFieldProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ -(NSString*)apiName
return @"Ti.UI.TextField";
}

-(NSMutableDictionary*)langConversionTable
{
return [NSMutableDictionary dictionaryWithObjectsAndKeys:@"hintText",@"hinttextid",nil];
}

@end


Expand Down