Editing text in a TextArea inside of a component managed by a Tabs component damages swiping

51 views
Skip to first unread message

Jeff Crump

unread,
Dec 5, 2014, 3:56:12 PM12/5/14
to codenameone...@googlegroups.com
NetBeans 8.0.2
Windows 8.1
Simulator: No
Device: Android

I have a single form with a Tabs component managing the content pane. On one container managed by Tabs I placed a TextArea component. The tabs swipe properly until I modify the text in the TextArea. Once the keyboard is removed swiping appears "jittery" and hard to control.

This problem does not occur on the simulator but does on my Android phones. I haven't tried it out yet on an iPhone or Blackberry yet.

Jeff Crump

Shai Almog

unread,
Dec 6, 2014, 1:02:56 AM12/6/14
to codenameone...@googlegroups.com
I'm assuming the text area is just the final straw in something that is more wide sweeping.
Do you have any gradient backgrounds or small tiled images?
Did you use the performance monitor?
Did you go over the performance video: http://www.codenameone.com/how-do-i---improve-application-performance-or-track-down-performance-issues.html

Jeff Crump

unread,
Dec 6, 2014, 9:51:47 AM12/6/14
to codenameone...@googlegroups.com
Actually it is just a very simple concept app to test out a different user interface layout.

Using the basic theme with nativebool and the native component uiids.
Form -- > content pane --> Tabs:
Tab 1: two labels
Tab 2: one label, one textfield
Tab 3: one label, one textarea

No images or gradients. Plain solid white background. Graphic memory overhead is 370k
On the simulator there are no EDT violations(set to full)
The performance monitor shows the first time the form is instantiated the time is the highest, but the average invocation is about 6.5 milliseconds after that. The textarea component has nearly the lowest average time. The tabs component show an average time of 0.2ms.

The simulator doesn't emulate the keyboard and editing the text using it has no negative impact at all.

The best way to describe the affect: The problem starts after editing the text in the textarea after the keyboard goes away, then swiping to and from that tab has problems. On the tab prior the one with the TextArea attempting to swipe the causes it to repeatedly bounce against the left margin until I lift my finger and then the TextArea tab comes into view.

Shai Almog

unread,
Dec 6, 2014, 11:13:29 AM12/6/14
to codenameone...@googlegroups.com
Did you give columns/rows to the text area? Try giving a relatively large number to the columns.
Is it possible there are exceptions you aren't seeing in the console or some other failures that would only happen on the device?

Jeff Crump

unread,
Dec 6, 2014, 11:29:22 AM12/6/14
to codenameone...@googlegroups.com
All properties that I have explicitly set:

uiid = "TextArea", Columns = 32, rows = 6, max size = 320, grow limit= 6, editable = true, grows by content = false, text = "The quick brown fox jumps over the lazy dog."

Every catch I log to the console and there are none. On the device the content pane scrolls up to accommodate the keyboard, but there is not done key so I must tap outside of the keyboard/textarea to close it. Could that be the problem? The text fields have either a next or done key.

Jeff Crump

unread,
Dec 6, 2014, 5:25:17 PM12/6/14
to codenameone...@googlegroups.com
Shai you were correct!

The problem is the maximum columns. Too large and the swiping effect fails.

Thank you for your assistance.

Shai Almog

unread,
Dec 7, 2014, 1:42:35 AM12/7/14
to codenameone...@googlegroups.com
Sorry I'm not sure I was correct :-)
What do you mean by too large maximum columns?

Jeff Crump

unread,
Dec 7, 2014, 7:29:15 AM12/7/14
to codenameone...@googlegroups.com
I has set the max columns to 32, but all I could physical type in on the Android was 30. I lowered the max columns to 28 and the problem went away.

Shai Almog

unread,
Dec 7, 2014, 12:49:21 PM12/7/14
to codenameone...@googlegroups.com
That shouldn't be the case. It should be seamless!
Do you have X scrollability on the form? What sort of layout is the TextArea placed into?
Reply all
Reply to author
Forward
0 new messages