10-13-2011 06:10 AM
I created a CustomListManger by extemding VerticalFieldManager. for the rows I created a CustomRow Manager by extending Mnager.
When I display the list I am not able to focus on the CustomRowManager that I have added. Focusable property is enabled for both CustomRowManager and CustomListManger .
Any help is welcomed!
Solved! Go to Solution.
10-13-2011 06:17 AM
10-14-2011 01:56 AM
Hello pp, thanks a lot for your reply. the above code has helped me in performing a neat scroll, it is not working if in case I use
g.setBackGround(Color.BLUE);
A Y
10-14-2011 04:30 AM
10-14-2011 07:56 AM
Hello PP, that code worked great for focusing effect, but it didn't cater my other requirement to add fields to manager and I should also be able to fire an event when click is performed.
From my understanding the method g.fillRect(0,0,Display.getWidth(),Display.getHeigh
I am following this thread as my reference for performing
Regards,
A Y
10-14-2011 08:08 AM - edited 10-14-2011 08:09 AM
This is the look I am working on,
ParentManager extends VerticalFieldManager{}
MyMaanger extends Manager implements FocusChangeListener, FieldChangeListener
{
static int i = 0;
NullField _focus = null;
public MyManager(){
i = i+1;
_focus = new NullField(NullField.FOCUSABLE|NullField.STATUS_MOV E_FOCUS_VERTICALLY);
_focus.setFocusListener(MyManager.this);
_focus.setChangeListener(MyManager.this);
this.add(_focus);
this.setChangeListener(MyManager.this);
this.add(new RichTextField("LIST COUNT "+i,RichTextField.NON_FOCUSABLE));
}
public void focusChanged(Field field, int eventType) {
this.getManager().invalidate();
int a = this.getFieldWithFocusIndex();
int b = this.getFieldCount();
Field _f = this.getFieldWithFocus();
}
protected void paintBackground(Graphics g) {
int prevBg = g.getBackgroundColor();
if (_focus.isFocus()) {
g.setBackgroundColor(Color.LIGHTBLUE);
} else {
g.setBackgroundColor(Color.WHITE);
}
g.clear();
g.setBackgroundColor(prevBg);
}
public void fieldChanged(Field field, int context) {
UiApplication.getUiApplication().pushScreen(new Screen2());
}
}This is the desired look, which is achieved, but no luck with clicklistener
10-15-2011 01:34 AM
I used the below thread to solve the solution:
http://supportforums.blackberry.com/t5/Java-Develo