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-24639] Android: Implement Ti.UI.TextField.hintType #9114

Merged
merged 4 commits into from Aug 7, 2017

Conversation

garymathews
Copy link
Contributor

@garymathews garymathews commented Jun 6, 2017

  • Implement Titanium.UI.TextField.hintType utilizing android.support.design.InputTextLayout
  • Add test case to ti.ui.textfield.test.js
TEST CASE
var win = Ti.UI.createWindow({
        backgroundColor: 'gray',
        layout: 'vertical'
    }),
    a = Ti.UI.createTextField({
        hintText: 'TEXT A',
        width: Ti.UI.FILL
    }),
    b = Ti.UI.createTextField({
        hintText: 'TEXT B',
        hintType: Ti.UI.HINT_TYPE_ANIMATED,
        width: Ti.UI.FILL
    }),
    btn = Ti.UI.createButton({
        title: 'TOGGLE hintType',
        width: Ti.UI.FILL
    });

btn.addEventListener('click', function() {
    a.hintType = (a.hintType === Ti.UI.HINT_TYPE_ANIMATED ? Ti.UI.HINT_TYPE_STATIC : Ti.UI.HINT_TYPE_ANIMATED);
    b.hintType = (b.hintType === Ti.UI.HINT_TYPE_ANIMATED ? Ti.UI.HINT_TYPE_STATIC : Ti.UI.HINT_TYPE_ANIMATED);
});

win.add([a, b, btn]);
win.open();

JIRA Ticket

@garymathews garymathews added this to the 6.2.0 milestone Jun 6, 2017
@garymathews garymathews requested a review from ypbnv June 6, 2017 13:16
Copy link
Contributor

@ypbnv ypbnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: Pass

@ypbnv
Copy link
Contributor

ypbnv commented Jun 28, 2017

@garymathews Building a SDK version with the changes found some missing imports. Can you check that. It seems I missed that while merging #9027
To be more specific:

import android.support.design.widget.TextInputLayout;
import android.widget.LinearLayout;
import ti.modules.titanium.ui.UIModule;

in TiUiText.java

@garymathews
Copy link
Contributor Author

@ypbnv Updated

@ypbnv
Copy link
Contributor

ypbnv commented Jun 30, 2017

@garymathews Looks good to me!

@lokeshchdhry
Copy link
Contributor

FR Passed.

hintType works as expected & takes 2 values Ti.UI.HINT_TYPE_ANIMATED & Ti.UI.HINT_TYPE_STATIC.

Verified it using an alloy & classic app.

Studio Ver: 4.9.1.201707200100
SDK Ver: 6.2.0 local build
OS Ver: 10.12.3
Xcode Ver: Xcode 8.3.3
Appc NPM: 4.2.9
Appc CLI: 6.2.2
Ti CLI Ver: 5.0.14
Alloy Ver: 1.9.11
Node Ver: 6.10.1
Java Ver: 1.8.0_101
Devices: ⇨ motorola XT1033 --- Android 4.4.4, Nexus 5 --- Android 6.0.1
Emulator: Android 7.0

@lokeshchdhry
Copy link
Contributor

lokeshchdhry commented Jul 27, 2017

@garymathews , @ypbnv Can you guys please resolve the conflict.

@lokeshchdhry lokeshchdhry merged commit 7f0c04e into tidev:master Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants