i am developing a simple calculator application in blackberry now, and i am new to that environment.
i want to develop an application(calculator) which runs in a list like. probably there will be more simpler ways for implementing this. but i want to study with my stuff.
value1 : (numeric textfield)
value1 : (numeric textfield)
+ : (result(value1+value2))
- : (result(value1-value2))
* : (result(value1*value2))
/ : (result(value1/value2))
for this application, I have developed using eclipse as..
public class Scr_Main extends MainScreen
{
String my_array[] = new String[]{"+", "-", "*","/"};
EditField editfield_value1,editfield_value2;
ObjectListField my_list;
GridFieldManager gfm;
public Scr_Main()
{
this.setTitle("Address Book");
//Defining Components
gfm = new GridFieldManager(1, 1, 0);
editfield_value1 = new EditField("Enter Value :", "");
add(gfm);
gfm = new GridFieldManager(1, 1, 0);
editfield_value2 = new EditField("Enter Value :", "");
add(gfm);
my_list= new ObjectListField();
my_list.set(my_array);
add(my_list);
}
}
Now my question is how can i divide the list into two halves. or do i need to add one more list? or is there any way a list to be divided into two halves?
Override the
ListFieldCallback.drawListRow()method to customise the way each row is painted.