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-16512] Android: added left and right padding to TextField #5492

Closed
wants to merge 4 commits into from

Conversation

bijupmb
Copy link
Contributor

@bijupmb bijupmb commented Mar 19, 2014

@hieupham007
Copy link
Contributor

Please add documentation and a test case.

@bijupmb
Copy link
Contributor Author

bijupmb commented Apr 1, 2014

will update

tv.setPadding(TiConvert.toInt(d, TiC.PROPERTY_PADDING_LEFT), 0, 0, 0);
}
if (d.containsKey(TiC.PROPERTY_PADDING_RIGHT)) {
tv.setPadding(0, 0, TiConvert.toInt(d, TiC.PROPERTY_PADDING_RIGHT), 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is incorrect. If I have padding left and right properties set, the padding right will override the padding left. You need to keep track of these paddings and apply them properly.

@hieupham007
Copy link
Contributor

The implementation is incorrect. Please address comments.

@negupta
Copy link
Contributor

negupta commented Apr 17, 2014

@bijupmb There has been no update on this PR for over a week now. We should follow up proactively on these PR comments.

@bijupmb
Copy link
Contributor Author

bijupmb commented Apr 18, 2014

Already modified
bijupmb@1fd508a

@negupta
Copy link
Contributor

negupta commented Apr 28, 2014

@hieupham007 - Please review this PR.

@@ -262,7 +290,7 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP
TiUIHelper.styleText(tv, (HashMap) newValue);
} else if (key.equals(TiC.PROPERTY_AUTO_LINK)) {
TiUIHelper.linkifyIfEnabled(tv, newValue);
} else {
} else if (!setTextPadding(proxy.getProperties())){
Copy link
Contributor

Choose a reason for hiding this comment

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

This implementation is inefficient. You don't need to call it every time a property is changed.. You only need to call it when paddingRight and Left is called.

@hieupham007
Copy link
Contributor

Please extend this to implement padding top and bottom as well. Also update documentation and test case to include them.

@hieupham007
Copy link
Contributor

Code reviewed. Please address comments

@bijupmb
Copy link
Contributor Author

bijupmb commented Apr 30, 2014

start working on this

@bijupmb
Copy link
Contributor Author

bijupmb commented May 1, 2014

Done

@ingo ingo changed the title TIMOB-16512 added left and right padding [TIMOB-16512] added left and right padding Nov 17, 2014
@ingo ingo changed the title [TIMOB-16512] added left and right padding [TIMOB-16512] Android: added left and right padding to TextField Nov 17, 2014
@hieupham007 hieupham007 reopened this Nov 18, 2014
@skypanther
Copy link
Contributor

@hieupham007 Can you review the latest code please?

platforms: [iphone, ipad]
platforms: [iphone, ipad, android]

- name: paddingBottom
Copy link
Collaborator

Choose a reason for hiding this comment

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

Indentation 2 spaces left

@hansemannn
Copy link
Collaborator

I really like this PR, although the CLA is not signed and there are merge conflicts with latest SDK. @ashcoding can you investigate what we could to to support this? It would be great for parity-reasons, here are the current docs.

@m1ga
Copy link
Contributor

m1ga commented Apr 2, 2016

@bijupmb hope it's fine that I updated your PR to be merged in the latest branch again!

@hansemannn hansemannn closed this Apr 2, 2016
@hansemannn
Copy link
Collaborator

Closing this PR in favor of #7908 to incorporate with the suggested changes. Thanks guys!

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

6 participants