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

Add convenient functions #225

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add convenient functions #225

wants to merge 1 commit into from

Conversation

mbmc
Copy link

@mbmc mbmc commented Jul 15, 2015

No description provided.

@@ -331,6 +331,14 @@ public MaterialEditText(Context context, AttributeSet attrs, int style) {
init(context, attrs);
}

public String getString() {
return getText().toString().trim();
Copy link

Choose a reason for hiding this comment

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

you should not trim here. its not responsibility of the the met

Copy link
Author

Choose a reason for hiding this comment

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

getTrimmedString instead?

Choose a reason for hiding this comment

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

I would not put it at all (my point of view). this is an edittext, it should not care about how you want to handle the string typed

Copy link
Author

Choose a reason for hiding this comment

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

Yeah but when you deal with user profile forms, you need to trim the strings. Either by extending MET, or creating a static function.

Copy link

Choose a reason for hiding this comment

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

you are free to do that on your side. what about if I need to get space the user has typed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants