When you create a native component, it's up to you to "style" it.  You
might want to check out the cn1-native-controls cn1lib as a reference, as I
include a native text field component with it.

https://github.com/shannah/cn1-native-controls

The strategy that I used here was to add a method to the native interface
"updateStyles()", which, when called, updates the styles of the native
component based on the styles assigned to its lightweight container.

https://github.com/shannah/cn1-native-controls/blob/master/native/ios/com_codename1_nui_NTextFieldNativeImpl.m

Note;  I don't recommend creating your own native text field unless you
have a really good reason.  There are all kinds of complexities around
making native text fields work properly, and the built-in TextField and
TextArea components already take care of all of these things for you.

On Mon, Nov 4, 2019 at 2:02 AM Hasni Faiçal <[email protected]> wrote:

> If you are experiencing an issue please mention the full platform your
> issue applies to:
> IDE: NetBeans/Eclipse/IDEA
> Desktop OS
> Simulator
> Device
>
> 1- I created a nativeCall to return a PeerComponent as a (UITextField,
> EditText) for iOS and android respectively.
> How to add look and feed for this text field to look the same as CN1
> TextField?
> 2- Is there any way to interact with this native TextField (eg. setting
> hint) without implementing this behavior in native code?
> 3- Is there any way to access UITextField and EditText from CN1 TextField
> in native code?
>
> --
> You received this message because you are subscribed to the Google Groups
> "CodenameOne Discussions" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/codenameone-discussions/a691e1bf-8daa-4e13-be60-b4e6d677a43c%40googlegroups.com
> <https://groups.google.com/d/msgid/codenameone-discussions/a691e1bf-8daa-4e13-be60-b4e6d677a43c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Steve Hannah
Software Developer
Codename One
http://www.codenameone.com

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/CAGOYrKWZxa-LV4Jznv-gF7PCF_f%2B6rGb7vTQh1eMFuPXB%2BdpAw%40mail.gmail.com.

Reply via email to