04-28-2014 08:47 AM
Hy everyone, I am trying to create a Blackberry app and i created a LabelField with some text, and i want to make a button in the same line with the text, but i don't know how to do that.
Here is the code:
LabelField stake = new LabelField("Chicken stake", Field.FIELD_LEFT);
HorizontalFieldManager buttonManager = new HorizontalFieldManager(Field.VISUAL_STATE_ACTIVE);
ButtonField add = new ButtonField("Add", ButtonField.CONSUME_CLICK);
Unfortunetly my code puts the button under the text, but i want to be in the same line with it. Please help me !
Solved! Go to Solution.
04-28-2014 10:15 AM - edited 04-28-2014 10:18 AM
I suspect from your code that you don't really understand BlackBerry Ui - which is not surprising given that you are new to the platform. So I suggest some background reading on UI and Fields. The Java micro-site contains information that will be useful, for example this:
I suggest you work through the entire site - not leanring everything but finding out where useful documentation is:
Once you have done that, I suspect you will then fall into the trap that other have fallen into when putting labels and Buttons side by side. So if you do have problems with this, then use the Search Field (see top right) to find the questoins that others have asked and resolved.