Chamaeleon (Your Material Textfield)

:partying_face: Itā€™s done!

Iā€™ve finished with the new version of Chamaeleon! Iā€™m not sure of who uses this currently, but if you do, Iā€™ve just saved you a whole ton of arrangements with the new one. Before we begin, it does come in a very large size, but if you donā€™t care then letā€™s begin!

Blocks?

These are from an example project which I included the AIA for.

Configuration structureā€¦

You can remove any property and it will still work, but it will stick to defaults for the missing property!

Configure block

{
  BOX_CORNER_RADIUS: 4,
  MODE: "LIGHT" || "DARK",
  SECONDARY_COLOR: "#1A73E9",
  TEXT_COLOR: "#000000"
}

ā€œBOX_CORNER_RADIUSā€ accepts any integer and will be the corner radius of the outlined textfield.

ā€œMODEā€ is where you use ā€œLIGHTā€ or ā€œDARKā€, the hint color depends on this property. The hint color will be the opposite of the mode so if your background color of the arrangement or screen is light, then set the mode to ā€œLIGHTā€ so the hint color will be darker than the background.

ā€œSECONDARY_COLORā€ will default to ā€œ#1A73E9ā€, but as an integer. It only accepts integers, it will not convert a HEX to a color-int. This will be the outline color of the textfield when in focus.

ā€œTEXT_COLORā€ will default to ā€œ#000000ā€, but as an integer. It only accepts integers, it will not convert a HEX to a color-int. This will be the text color of the textfield when someone types.

Create block

{
  HINT: "Hello world!",
  IS_SINGLE_LINE: true || false
}

ā€œHINTā€ accepts only strings and will be the hint (and floating label) of the outlined textfield.

ā€œIS_SINGLE_LINEā€ accepts only boolean and is whether the textfield will be 1 line or allow more to be shown when the width in text is reached.

The end :slight_smile:

I hope that the block picture made you understand much of what youā€™re supposed to do! Enjoy :slight_smile:

MaterialTextfields.aia (3.1 MB)
io.gitlab.stormifire.textfields.aix (3.1 MB)

9 Likes

Nice! But the extension size :scream:

3 Likes

Yes, but it will improve in the next update!

2 Likes

great extension @hammerhai !
I was just trying the new version, but unfortunately, i didnā€™t get it working :sweat: It always throws this error:

java.lang.NoSuchMethodError: No virtual method setTextCursorDrawable(Landroid/graphics/drawable/Drawable;)V in class Landroid/support/design/widget/TextInputEditText; or its super classes (declaration of 'android.support.design.widget.TextInputEditText appears in base.apk)

My blocks for testing are:


However, this error is quite clear, setTextCursorDrawable method was added in api 29 ( In the textView class ).Mine is 24 ( Android 7.0 Nougat ) :sweat_smile:

2 Likes

Critical Fix (#24)

This release fixes a critical issue that would prevent the creation of textfields.

io.gitlab.stormifire.textfields.aix (3.1 MB)
The version was not changed, we are still in the month of November.

6 Likes

great and too sized extension great.
but how do u reduce size of aix?

1 Like

At the moment I have not reduced the size, however that will be fixed shortly!

1 Like

2020.11.12 ā€” V2

This release has been incremented and is experimental. Use with caution. If problems occur, please downgrade to 2020-12 after reporting the issue.

This release includes:

  • A reduced library size.
  • The ā€œmodeā€ property has moved to the designer. This will not effect current dictionaries used in the Configure method, they will just be useless blocks and there is no need to remove them unless youā€™d like to!

io.gitlab.stormifire.textfields.aix (664.8 KB)

6 Likes

Thanks for reducing size

1 Like

Is there any way to change the border color? Iā€™ve used the same blocks as yours and changed themes but itā€™s still a grey, barely visible color.

tested on 2020.11.12 and 20220.11.11

1 Like

is this like a custom textbox extension?

This version I have noticed has issues with the border color.

I can add this if youā€™d like, but I do have to figure out why the border wonā€™t change colors from 12 days ago.

Sure? :thinking:

2 Likes

If you can do this it would be fantastic! Since itā€™s not visible on a gradient background.

2 Likes

Itā€™s not a matter of whether I can or canā€™t. I can, but I weighed the decision of adding it in the beginning because I did not know if people would contrast colors correctly, so instead I based it on whether the background of what it was being place in was light or dark.

@progr It seems I made a mistake on my part, I mustā€™ve forgot that I moved the mode property while testing after building. Iā€™ll add a custom color option for the border!

2 Likes

PLSSSS SAY ME
is this extension like addylins tutorial or u can create other designs with this
but i feel addylins trick is tough so which is best .extension vs tutorial

1 Like

Iā€™m sorry, did you not try the extension? From what I understand, you were telling me to reduce the size of the extension so Iā€™m going to assume youā€™ve tried it.

2 Likes

error
image

1 Like

Thanks, appreciate your work :grin:

2 Likes

What version are you using?

2 Likes

Great extension . :golfing_man:t2:

1 Like