# Clearable Text Field

DevFeed: [Clearable Text Field](<https://devfeed.tech/articles/clearable-text-field-19243.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/clearable-text-field/>)

Author: Shai Almog

Published: 2017-06-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [features](<https://devfeed.tech/tags/features.md>), [github](<https://devfeed.tech/tags/github.md>), [implement](<https://devfeed.tech/tags/implement.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [request](<https://devfeed.tech/tags/request.md>)

## AI overview

The article describes implementing a clearable text field in Codename One by wrapping a TextField with a clear button, noting that Android does not provide this natively. It also briefly mentions updates to the CN class API and a GitHub Discussions link.

## Source excerpt

A common request over the past couple of years has been to add a text field that supports a clear button in the end, we used to have a common answer on how this can be implemented but we didn't have an actual implementation builtin despite this being a relatively common request. At first I thought this is something we should implement natively but it turns out that this doesn't exist natively in Android so we just implemented this as a wrapper to the TextField e.g. replace this: