Native Android Field Theming

34 views
Skip to first unread message

letha...@gmail.com

unread,
Jun 18, 2014, 7:26:57 AM6/18/14
to codenameone...@googlegroups.com
Hi

I would like to use the standard Android Theme (and iOS) where possible. However, I've been instructed to make the background black, with white fields. As such I would need to change the looks of the native field, below, from the grey/blue combination to a white/green combination. What would be the best way to go about this?

Thanks!



Shai Almog

unread,
Jun 18, 2014, 10:03:18 AM6/18/14
to codenameone...@googlegroups.com, letha...@gmail.com
Hi,
by default a theme inherits from native so you should go thru the theme tutorial and create your own theme. It would still keep the native elements which you don't modify: http://www.codenameone.com/how-do-i---create-a-simple-theme.html

To customize an individual component you usually use an image border explained here: http://www.codenameone.com/how-do-i---create-a-9-piece-image-border.html

Tim Gaul

unread,
Jul 3, 2014, 2:39:48 AM7/3/14
to codenameone...@googlegroups.com
Thanks Shai.

I know in vanilla Android it's done quite easily and was hoping there was a way to do so without borders. No problem, will get on it.
Message has been deleted

Tim Gaul

unread,
Jul 3, 2014, 2:46:38 AM7/3/14
to codenameone...@googlegroups.com, letha...@gmail.com

As an example in vanilla Android:


Shai Almog

unread,
Jul 3, 2014, 10:29:09 AM7/3/14
to codenameone...@googlegroups.com, letha...@gmail.com
In Android you would generally use a 9-piece border too in order to customize theming.
Reply all
Reply to author
Forward
0 new messages