Xfx.Controls icon indicating copy to clipboard operation
Xfx.Controls copied to clipboard

suggestion xfxEditor

Open 14skywalker opened this issue 7 years ago • 7 comments

Title says it all: we would welcome a xfxEditor

14skywalker avatar Jun 30 '17 07:06 14skywalker

@14skywalker I like the idea. Are you simply looking for an Editor with floated labels and an error message, or do you envision more?

ChaseFlorell avatar Jul 02 '17 01:07 ChaseFlorell

Hi @ChaseFlorell, interesting that you ask. We were also looking for an editor that would increase in height when needed. Like this: https://storage.googleapis.com/material-design/publish/material_v_11/assets/0B5ZSepuCX1xOVEhXVDltQzgzQzA/TextFields-MultiLine-Long-01.mp4

14skywalker avatar Jul 02 '17 18:07 14skywalker

@14skywalker you can actually do that now by first measuring the length of the text and adjusting the HeightRequest when the height changes. For added pizazz, I would use an Animation to adjust the height.

Personally I would create a Behavior<Editor> that watches for TextChanged. Whenever the text changes, measure the new text and re-animate the height.

ChaseFlorell avatar Jul 03 '17 16:07 ChaseFlorell

Thanks @ChaseFlorell, This would mean that the XfxEditor would only add the possibility to use new lines in the input? That is something we can live without for now.

14skywalker avatar Jul 04 '17 07:07 14skywalker

I now see that with "you can do that now" you mean with the Editor (not currently in combination with a floating label). Meaning: We still would welcome an XfxEditor.

14skywalker avatar Jul 04 '17 11:07 14skywalker

Yes that's correct. We can do the editor sizing now using a behavior. The floated labels would need implementing.

ChaseFlorell avatar Jul 04 '17 14:07 ChaseFlorell

I did make a start with an XfxEditor and Android renderer, but I could not make the EditorEditText inside the TextInputLayout to use more space than one line. By the way, the EditorEditText is more protected than the EditText that is used by the XfxEntry on android. I needed reflection to get to the constructor. Maybe there is a better way... So, for what it is worth:

XfxEditor.cs XfxEditorRenderer.cs

14skywalker avatar Jul 05 '17 09:07 14skywalker