Note that there are some explanatory texts on larger screens.

plurals
  1. POClick event is working outside the button
    text
    copied!<p>I am putting a button in a bottom bar of the screen. Bottom bar is basically a horizontal field manager with a background image. Now this button(Basically a Continue button) is used to move to next screen. but if i will click in the manager and outside the button, it is going to the next screen. So click event is working on total manager, Below is code:</p> <pre><code>HorizontalFieldManager hfmBtn = new HorizontalFieldManager(Field.FIELD_BOTTOM) { protected void sublayout(int nMaxWidth, int nMaxHeight) { height = Bitmap.getBitmapResource("buttom_bar.png").getHeight(); super.sublayout(nMaxWidth, nMaxHeight); setExtent(getPreferredWidth(), getPreferredHeight()); } public int getPreferredHeight() { return height; } public int getPreferredWidth() { return screenWidth; } }; hfmBtn.setBackground(BackgroundFactory.createBitmapBackground(Bitmap.getBitmapResource("buttom_bar.png"))); btnContinue = new CustomButtonImageField("Continue", Bitmap.getBitmapResource("button_normal.png"), Bitmap.getBitmapResource("button_hover.png"),Field.FIELD_VCENTER); btnContinue.setChangeListener(this); btnContinue.setMargin(10, 0, 0, screenWidth/3); hfmBtn.add(btnContinue); add(hfmBtn); </code></pre> <p>And here is the click event :</p> <pre><code> public void fieldChanged(Field field, int context) { if(field == btnContinue) { UiApplication.getUiApplication().pushScreen(new SendListScreen(platformContext,strItemList)); } } </code></pre> <p>please help me.. I am testing in BB Bold 9790.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload