problem with comparison of bitmaps

Hello

I have a timerTask every second making a screenshot. then he compared it to the previousScreenshots - if they are equal, nothing happens, if they are different, the new screenshot is sent to the server. Here are a few lines how do (and compare):

public void run(){

_width = Display.getWidth();
_height = Display.getHeight();
_currentScreen = new Bitmap(_width, _height);
_previousScreen = new Bitmap(_width, _height);

if( _currentScreen != null) {
    Bitmap _temp =   _previousScreen;
    _previousScreen = _currentScreen;
    _currentScreen = _temp;
                }

try{
    Display.screenshot(_currentScreen);

} catch(Exception e) {      }

//if bitmaps are equal-do nothing
if( checkIfEqual(_currentScreen, _previousScreen))
{ }
//otherwise send screenshot
else{
//send screenshot
_singletonConnection.sendData(_currentScreen);
            }

}//end of run

// check if current and previous bitmaps are equal.
// if yes - return true, otherwise return false

public boolean checkIfEqual(Bitmap _b1, Bitmap _b2){

 _rgbdata1 = new int[_width*_height];
 _rgbdata2 = new int[_width*_height];

 //getARGB
 _b1.getARGB(_rgbdata1, 0, _width, 0, 0, _width, _height);
 _b2.getARGB(_rgbdata2, 0, _width, 0, 0, _width, _height);

 //check, if ARGB's are equal
 if(!Arrays.equals(_rgbdata1, _rgbdata2)){

 return false; //bitmaps are different
}
 else {
    return true; //bitmaps are equal
            }
    }//end of checkIfEqual

My problem is that the screenshots are always different - I create a new object each time in run method (_currentScreen = new Bitmap...);

but I have to do it like that. because if I set the width/height and _currenScreen and _previousScreen in a constructor and then - I'm having the problem by comparing when I turn (for example in horizontal position) of the device (e.g. the storm). so each run of the run method, only to set width, height, currentScreen and previousScreen so that I'll be able to recognize if the unit is in vertical or horizontal position...

can anyone suggest me how can I solve it?

Kind regards

Try something like this:

public void run()
{
    _width = Display.getWidth();
    _height = Display.getHeight();
    _currentScreen = new Bitmap(_width, _height);
    try{
    Display.screenshot(_currentScreen);
    } catch(Exception e) {      }

    //if bitmaps are equal-do nothing
    if( checkIfEqual(_currentScreen, _previousScreen))
    { }
    //otherwise send screenshot
    else{
       //send screenshot
       _singletonConnection.sendData(_currentScreen);
    }
    _previousScreen = _currentScreen;
}//end of run

// check if current and previous bitmaps are equal.
// if yes - return true, otherwise return false
public boolean checkIfEqual(Bitmap _b1, Bitmap _b2)
{
    if(_b1 == null || _b2 == null)
       return false;
    if(_b1.getWidth() != _b2.getWidth() || _b1.getHeight() !=
       _b2.getHeight())
       return false;  

    _rgbdata1 = new int[_width*_height];
    _rgbdata2 = new int[_width*_height];

    //getARGB
    _b1.getARGB(_rgbdata1, 0, _width, 0, 0, _width, _height);
    _b2.getARGB(_rgbdata2, 0, _width, 0, 0, _width, _height);

    //check, if ARGB's are equal
    if(!Arrays.equals(_rgbdata1, _rgbdata2)){
    return false; //bitmaps are different
    }
    else {
    return true; //bitmaps are equal
    }
}//end of

Tags: BlackBerry Developers

Similar Questions

  • Problem with comparison column multi Nested Tables

    Hello

    I am facing a problem while comparing two collections using operator of type MULTISET. Below I pasted code examples referring to the Employees table in the HR schema.
    program works very well, if it's a single column if I declare that, tab type is table of varchar2 (n);

    Example code:
    --create type base_type as object (id number,name varchar2(10));
    --create type type_tab is table of base_type;
    declare
    v type_tab :=type_tab();
    v2 type_tab :=type_tab();
    v3 type_tab :=type_tab();
    v1 number;
    begin
    select base_type(employee_id,last_name) bulk collect into v from employees where employee_id in (100,101,102);
    select base_type(employee_id,last_name) bulk collect into v2 from employees where employee_id in (100,101);
    
    v3:= v MULTISET EXCEPT v2;
    end;
    Error
    ERROR on line 10:
    ORA-06550: line 10, column 6:
    PLS-00306: wrong number or types of arguments in the call to 'MULTISET_EXCEPT_ALL '.
    ORA-06550: line 10, column 1:
    PL/SQL: Statement ignored

    Could you please address the issue and guide me how to solve this problem.
    Thank you.
    Renji

    Why would you use collections like this in the first place?

    When the data is the engine of SQL, then use the SQL engine to to deal with - not PL/SQL. And no - nested tables have no place in a good, working, flexible, high-performance and scalable relational design in Oracle.

    To do this, use the multiset SQL function - example

    .. your plsql code..
    
      select
        v MULTISET EXCEPT v2 into  v3
      from dual;
    end;
    
  • Problem with comparison of input text

    Hello people,

    I tried searching for an answer to this question, but I did have a little chance to find something that actually fits the question.

    I created three zones of text entry with the instance names: input001, input002 and input003.

    The three boxes are used for a comparison of values of simple text for an exercise in question.

    The entry text boxes have been entered restricted so that only the values A, B, C or D can be entered (representing the four possible answers).

    I created a button and event listener and the following function.

    function submitBtn001Click(evt:MouseEvent):void{
        trace("input001 = "+input001.text+" input002 = "+input002.text+" input003 = "+input003.text);
        if(input001.text == "A" && input002.text == "D" && input003.text == "C"){
            input001.type = "dynamic";
            input002.type = "dynamic";
            input003.type = "dynamic";
            correct.alpha = 1;
            submit_btn.visible = false;
        }else if((input001.text !== "A" | input002.text !== "D" | input003.text !== "C") && tryAgain == 1){
            tryAgain++;
            trace(tryAgain);
            submit_btn.visible = false;
            reset_btn.visible = true;
            incorrect_first_try.alpha = 100;        
        }else if((input001.text !== "A" | input002.text !== "D" | input003.text !== "C") && tryAgain >= 2){
            input001.type = "dynamic";
            input002.type = "dynamic";
            input003.type = "dynamic";
            incorrect.alpha = 100;
            submit_btn.visible = false;
            }        
    }
    

    When I compile the SWF, I get the following error:

    1067: constraint implied of a Boolean value to a number that is unrelated.

    The error is attributed to the combination of else-if statements. If I comment on the other if statements, the SWF compile without error and the code runs correctly, when I enter the correct answers in entry areas (A, D, C).

    What I don't understand is why my comparisons of strings in the world if the statements are generating an error, or why this error would have something to do with Boolean or number, as I compare the string value of text entry boxes (input001.text, for example) with a string.

    Thanks in advance for your help.

    Use the OR operator logic (|) instead of the OR operator (|)

  • Strange problem with HorizontalFieldManager - it does not show on real device bitmap

    I have a rather strange problem with the HorizontalFieldManager on my Blackberry 8820, which I did not on the Simulator, or done other blackberries that I tried to install my game.

    The problem is that bitmaps that I add, do not appear on the actual device, as in the images below. The code is provided below as well. No idea how to debug, or resolve is appreciated.

    Here's what I see on Simulator and some devices

    Here's what I see on the real blackberry:

    Code:

    ......

    OK, I found the solution - the problem is that there seems to be a bug where you can't put more fields button radio on a horizontal layout manager with 4.2.2.x.

    The solution is to extend the RadioButtonField field and replace the positioning method:

    RadioButtonField radioField = new RadioButtonHack ("", textureGroup, isSelected);

    SerializableAttribute public class RadioButtonHack extends RadioButtonField {}

    public RadioButtonHack() {}
    Super();
    }

    public RadioButtonHack (String label, group RadioButtonGroup,
    Boolean selected, long style) {}
    Super (label, group, selected, style);
    }

    public RadioButtonHack (String label, group RadioButtonGroup,
    Boolean selected) {}
    Super (label, selected group);
    }

    public RadioButtonHack (label As String) {}
    Super (label);
    }

    Protected Sub layout (int width, int height) {}
    int temp = this.getPreferredWidth ();
    setExtent (time, height);
    Super.Layout (time, height);
    }

    }

    resolved http://supportforums.blackberry.com/t5/Java-Development/radiobuttonGroup-related-problem-in-storm/m-...

  • Problem with date comparison

    I have a problem with the TO_YMINTERVAL('10-00') function.


    Thank you
    Bachan.

    Published by: bah on March 23, 2010 14:47

    Please do not double post.
    Problem with TO_YMINTERVAL('10-00') function.

    Stick to your original thread, as others have already tried to help you.
    Start a new thread on the same topic is a waiste of time, as already provided entries are lost to other readers...

  • Satellite L670-1KZ - update driver & problem with game ARMA II

    Hello world

    I just bought this satellite L670-1KZ in France, and I've already found fews updated.

    But, before you do anything, I want to have comment and recommendation of other owners, to ensure that the files that I have are useful and cannot be damaged something (never know).

    (1) UPDATE RECOMMENDED OR NOT?

    It's the list of the update that I found:

    ATI Mobility Radeon HD 2000/3000/4000/5000/6000 version 11.3 WHQL
    Manufacturer: ATI Technologies Inc.
    Version: 8.831.2.0000
    The name of the inf file: c7115930.inf
    Of date inf file: 03/08/2011
    Date of publication (online): 30/03/2011

    Version of Realtek driver High Definition Audio R2.57 WHQL
    Manufacturer: Realtek Semiconductor Corp.
    Version: 6.0.1.6299
    The name of the inf file: hdapcee3.inf
    Of date inf file: 25/01/2011
    (Online) publication date: 02/09/2011

    Realtek RTL8100/8101/8102/8103/8105/8401/8110/8111/8168/8169 version 7.037.1229.2010 WHQL
    Manufacturer: Realtek
    Version: 7.037.1229.2010
    The name of the inf file: rt64win7.inf
    Of date inf file: 29/12/2010
    (Online) publication date: 02/09/2011

    Realtek RTL8191SE-VA2/RTL8192SE version 2019.1.1203.2010 WHQL
    Manufacturer: Realtek Semiconductor Corp.
    Version: 2019.1.1203.2010
    The name of the inf file: net8192se.inf
    Of date inf file: 12/03/2010
    (Online) publication date: 02/09/2011

    Intel Chipset Device Software version 9.2.0.1025 WHQL
    Manufacturer: Intel
    Version: 7.0.0.1013
    The name of the inf file: ibexahci.inf
    Of date inf file: 06/08/2010
    Date of publication (online): 03/09/2011

    Intel Rapid Storage Technology ICH7/ICH8/ICH9/ICH10/PCH version 10.1.0.1008 WHQL
    Manufacturer: Intel
    Version: 10.1.0.1008
    The name of the inf file: iaahci.inf
    Of date inf file: 11/06/2010
    Date of publication (online): 12-21-2010

    (2) ON THE VIDEO CARD:

    Also, I used an Amilo Xi 2550-8009 underpinning last week, I changed it to this Toshiba, but I am facing a problem with a game ARMA II.
    I got the error message is: 'Pixel shader compilation error', with a black screen and sound of 'ping '.
    I don't understand because I found a comparison test with a GeForce and my current HD5650 which is supposed to support this kind of thing shader.

    Have you managed to run ARMA II on your laptop? If so, what did I miss?

    Thanks in advance for your comments have fully appreciated,
    G2MARS

    Hey,.

    Generally these driver updates are not important if everything works properly. So in your case I don't install these updates if your laptop runs without problem.
    As you probably know: never touch a running system ;)

    Regarding your second question:
    Have you checked if ARMA 2 supports this graphics card? Have you installed the latest DirectX and more recent patch for this game?

  • I have a problem with the simulation in Matlab 6.5 and LabVIEW for PID controllers

    I have a problem with the simulation in Matlab 6.5 and LabVIEW. I have a few methods for granting regulators PID in MATLAB to go but not of LabVIEW. Degree of international teams of two transfer but when I passed to the fourth degree is no longer working. We have changed the formula to calculate the parameters for the fourth year and gave me some good values for assignment of Matlab, but when I put on LabVIEW are not resolved. the formulas are available in PDF format and are. Please help me and me someone if possible. Thank you
    Lim.4 generation in comparison methods and the MATLAB program settings are for the service of transfer to the second degree.

    Hello Lascarica,

    I noticed that you are using the screw of PID. Gains on these screws are based on TIME instead of GAIN. You should be able to build a PID regulator and vary the gains and then compare the results.

  • Problem with the gallery after update 2.3 music

    Hello

    Recently updated my XperiaX10i (French version, not operator sim locked). No problem with the update itself and the phone seems to work fine.

    But, the music gallery has first not detected music files already in the sd card 32 GB (no problem for photos, videos or other files), and does not so load in the library. I had to download them all again through Media Go and now the library shows them, but album covers are not more in the album list as in version 2.1, which was very convenient for the selection, however the sleeves appear in the background during playback of a track: this looks more like a bug than anything else.

    I am also missing the first Quick Launch bar application for Wifi, Bluetooth, GPS, sync and the brightness of the screen, it seems that the launch of all these features to go into the settings file now.

    In conclusion, I hardly see what exactly improved on this phone since version 2.1. except maybe the speed and the quality of the screen display.

    Update from 1.6 to 2.1 was a total revolution in comparison.

    Power control widget is always there

  • Dell Precision 7710 with NVIDIA Quadro M5000M problems with 3D WPF content

    I have a

    Dell Precision 7710

    6920HQ-i7 CPU @ 2.9 GHz

    32 GB of Ram

    Windows 7 Pro Sp1

    NVIDIA Quadro M5000M 369.49 driver version

    I bought an upgrade for my

    M6700 Precision

    Our company has developed and uses software that uses WPF to render 3D content in a XBAP in Internet Explorer.  When I try to use it on the 7710, 3D content flickers when it is redrawn, makes it almost unusable.  The stats we can get our application, we can see that time of update for refreshment / current is about 45ms, while on most of the other PC, even those using the integrated Intel graphics card, typically 12ms.

    We used this software on a large number of PC without feeling anything as bad, which is obviously quite disappointing because the laptop should be able to view we want to hassle.

    As far as I can tell all our drivers for everything on this laptop are up-to-date.

    We tried using the NVIDIA Control Panel to force the laptop to use the High Performance Nvidia Quadro rather than the graphics card integrated card and it seems to be made while we were able to do, it shows the icon in the taskbar notification and which showed that IE was using the Nvidia.

    I tried tweaking pretty much all other settings I can think / see.

    I tried to use the Dell Precision optimizer to select different profiles with no luck.  The Dell Precision optimizer seems not really demonstrate the use of the GPU processor or any other stats to see with the GPU, which seems odd to me.

    I ran Diagnostics on the laptop available on the Dell support site.

    I searched the net and found a few examples of problems with Nvidia and WPF cards, but none of these things that we found seems to apply to our application.  We have desktop computers at the office where he works well with other Nvidia cards / best of all.

    In addition, the fan on the 7710 will quite difficult sometimes - hard that I expect.  I tweaked the power settings to move less, but it always seems to run the fan more that I think it should / would appear on my M6700 - or maybe it's just a fan of stronger.

    So I wonder:

    If anyone out there has experienced something similar?  If so, any suggestions on how to fix or things to try would be greatly appreciated.

    Thank you

    We solved the problem by making changes in our application software.  We still don't seem to be able to reach the same FPS as for the other GPU, which should be similar, but we're working on that also.  Perhaps because we are trying to run the application at 4K.  If anyone has a similar laptop and can provide details on the 3D graphics performance using any software comparative analysis, it would be great if they could share for comparison.

  • Problem with PopupScreen.updateLayout)

    Hello guys '

    I have a problem with PopupScreen. I'm doing the cursor on the PopupScreen. This popupScreen includes BitmapField with transparent image. And the main screen is BitmapField larger than the size of the screen. I want to move the cursor (PopupScreen) on the BitmapField.

    You see what I'm doing here. And I found the solution how to move PopupScreen since the last post. Now, I am facing the problem when the cursor (PopupScreen) on the left. In other words, when I move the slider to the left, it is not clear previous position. I don't know why.

    It works fine when moves right.

    And it is not clear the previous, when position moves to the left.

    So, you can see the code that I use.

    import net.rim.device.api.ui.component.*;import net.rim.device.api.ui.container.*;import net.rim.device.api.ui.*;import net.rim.device.api.system.Bitmap;import net.rim.device.api.system.KeyListener;
    
    public class CursorField extends UiApplication {
    
      private InfoPopupScreen progressPopup;    int x = 180;  int y = 120;  ManagedScreen managedScreen;  Bitmap _bitmap1;  Bitmap _bitmap2;  Bitmap _bitmap;   int [] fillTrans = new int[100];
    
      public CursorField() {
    
          _bitmap = Bitmap.getBitmapResource("cursor1.png");        _bitmap1 = Bitmap.getBitmapResource("cursor1.png");       _bitmap2 = Bitmap.getBitmapResource("cursor2.png");
    
          for(int i = 0; i < 100; i++) {         fillTrans[i] = 0xFFFFFF;      }
    
          managedScreen = new ManagedScreen();      pushScreen(managedScreen);    }
    
      private class InfoPopupScreen extends PopupScreen implements KeyListener {
    
          protected void applyTheme() {         //Nothing     }
    
          public boolean keyStatus(int keycode, int time) {         return false;     }
    
          public boolean keyRepeat(int keycode, int time) {         return false;     }
    
          public boolean keyUp(int keycode, int time) {         return false;     }
    
          public InfoPopupScreen(Manager manager){          super(manager);       }
    
          protected boolean navigationMovement(int dx, int dy, int status, int time) {
    
              return true;      }
    
          protected void paintBackground(Graphics graphics) {           graphics.setBackgroundColor(16777215);        }
    
          public void sublayout(int width, int height){         super.sublayout(width, height);           setPosition(x, y);        }
    
          public boolean keyDown(int keycode, int time) {
    
              char key =  net.rim.device.api.ui.KeypadUtil.getKeyChar(keycode, net.rim.device.api.ui.KeypadUtil.MODE_UI_CURRENT_LOCALE);            //To left         if(key == 79 || key == 111) {             x = x - 5;                progressPopup.updateLayout();         }                      if(key == 73 || key == 105) {             x = x + 10;               progressPopup.updateLayout();         }
    
              if(key == net.rim.device.api.system.Characters.ESCAPE) {              this.close();         }         return true;      }
    
          public boolean keyChar(char key, int status, int time) {          return false;     }
    
          public boolean trackwheelRoll(int amount, int status, int time) {         return false;     }
    
          public boolean trackwheelUnclick( int status, int time ) {            return false;     }
    
          public boolean trackwheelClick( int status, int time ) {          super.trackwheelClick(status, time);          return true;      } }
    
      private class ManagedScreen extends MainScreen {      private BitmapField _cursorField;
    
          public ManagedScreen() {
    
              _cursorField = new BitmapField(_bitmap) {             public void paint(Graphics graphics) {                    graphics.setBackgroundColor(16777215);                    super.paint(graphics);                }         };
    
              FlowFieldManager manager = new FlowFieldManager(FlowFieldManager.USE_ALL_HEIGHT | FlowFieldManager.USE_ALL_WIDTH) {               public void paint(Graphics graphics) {                    graphics.setBackgroundColor(16777215);                    super.paint(graphics);                }         };
    
              manager.add(_cursorField);            progressPopup = new InfoPopupScreen(manager);
    
              Bitmap pic = Bitmap.getBitmapResource("background.jpg");          BitmapField picField = new BitmapField(pic);          add(picField);
    
              ButtonField _closeButton = new ButtonField("Push screen", ButtonField.CONSUME_CLICK | ButtonField.FIELD_HCENTER);         _closeButton.setChangeListener(new FieldChangeListener() {                public void fieldChanged(Field field, int context) {                  pushScreen(progressPopup);                }         });
    
              add(_closeButton);        } }
    
      public static void main(String[] args) {      CursorField application = new CursorField();      application.enterEventDispatcher();   }}
    

    I hope you can solve my problem.

    TNX in advance"

    Ttry this...   In paintBackground(), call clear after you set the background color.

  • Problem with touch in a focus Manager

    I searched the threads on this topic but impossible to find a solution.

    Here's the thing: I have a screen, to which I add a custom handler that I add other components such as buttons, textfields, other managers and so on.

    One of the components of this is a focus Manager, I did work as a button, because he was too customized to be a button, with two blocks of text and a bitmap.

    In a trackball device it works fine, when I ride down he's focused and I can select normally, but when I use a camera touch (9550) touchs are ignored.

    I had other problems with Tush, I used a VerticalManager for the front screen and no matter where I hit, the only button I could choose was the last. Then I changed VerticalManager to the Manager and it worked, but the focus Manager I mentioned previously still did not work.

    Any ideas?

    Thanks in advance.

    Kind regards

    Dan

    It seems that the Manager cannot be selected unless there is an active field inside so you need to touch this area.

    So, the solution is to add a new field to the handler, like this:

    add(managerFocusButton = new Field() {
        protected void paint(Graphics graphics) {
        }
        protected void layout(int width, int height) {
            setExtent(width, height);
        }
        public boolean isFocusable() {
            return true;
        }
        protected void drawFocus(Graphics graphics, boolean on) {
        }
    });
    

    And then this kid with the width and height of his Manager.

    The field is not visible and the Manager won't entirely.

    Thank you.

  • Problem with the ObjectListField

    Hello

    I have problems with the method getSelectedIndex() ObjectListField.
    Supposedly, when there is no index selected, it returns-1. But how come it always returns the index of the last element?

    To illustrate, I created my own dialog that has similar functionality to the "device window select" Bluetooth BB application. I have an ObjectListField and a Cancel button. What I did simply, is to change the label of the button to show the selected index. I have attached my sample code below.

    public class MyDialog extends dialog
    {
    private ObjectListField m_list;
    private ButtonField m_btn;

    public MyDialog)
    {
    Super ("Select Device:", null, null, 0, Bitmap.getBitmapResource ("bluetoothIcon.PNG"), Manager.FOCUSABLE);

    m_List = new ObjectListField();
    m_btn = new ButtonField ("Cancel", Field.FIELD_HCENTER);
    m_List.set (new String [] {"first", "second"});

    Add (m_List);
    Add (m_btn);
    }

    protected boolean navigationClick (int status, int time)
    {
    m_btn.setLabel (Integer.ToString (m_List.getSelectedIndex ()));

    Returns true;
    }
    }

    Can someone help me on this problem? Is there something wrong with my code, or is the buggy API? All I want to do is to return an index of-1 if there is no selected item in the list.

    Also, I tried the isFocus() method to check if the list is being concentrated, it always returns false even if the list is OBVIOUSLY being focused. I'm running out of options on how to determine the solution to this problem. Help, please!

    Thank you very much.

    @jacylan - I do not use isFocus() to determine if the ListField is net.  Take a look at the following code, I think that with this, you can force-1 when the ListField is not the point.

        protected boolean navigationClick(int status, int time)
        {
            int selectedIndex = m_list.getSelectedIndex();
            boolean listInFocusOption1 = false;
            if ( this.getLeafFieldWithFocus() == m_list ) {
                listInFocusOption1 = true;
            }
            boolean listInFocusOption2 = false;
            if ( m_list.isFocus() ) {
                listInFocusOption2 = true;
            }
            m_btn.setLabel(Integer.toString(selectedIndex) + ":" + listInFocusOption1 + ":" +listInFocusOption2);
    
            return true;
        }
    
  • Problem with the deployment of an application.

    Hi, I'm just starting to work on the development of BB and I'm having a problem with deployment/installation of applications on a Storm 2.  When my own app could not load I've compiled some of the demos provided with the JDK and have the same problem with them.

    Cases in the sample:

    I have compiled the accelerometer demo (and the bitmap demo) without error, using plug-in in Eclipse.  Then I try to install either software version 6 Desktop application and receive the following error message, "there was an error importing files.  No additional files are located.  "Your file may contain applications that already exist in the list of applications, are not compatible for your device or errors.

    I know it compiled without errors, do not know if these demos are compatible with my camera, and I know that they are not already installed.  Also, I change the paths of any file or folder when they were packed oringinal.

    I hope it's an easy issue and miss me just something obvious.  Thanks in advance.

    Ross

    What model of smartphone BlackBerry and the version of the software BlackBerry device test you on?  You can find this under Options, all on the BlackBerry Smartphone.

    What version of BlackBerry Java SDK or BlackBerry JDE has been used?  See the link below for an explanation of choosing the appropriate version.

    Appropriate version of the JDE BlackBerry and BlackBerry Java SDK

    http://supportforums.BlackBerry.com/T5/Java-development/appropriate-version-of-the-BlackBerry-JDE-an...

  • Problem with class extend the field

    Hi all!

    Now, I have a problem with the class extend the field:

    public class ContentItem extends field

    {

    have a bitmap and text

    }
    Public MustInherit class ContentField extend the field

    {

    protected abstract void paint (graphics graphics);

    protected abstract void drawFocus (Graphics graphics);

    }

    SerializableAttribute public class, contented extends ContentField

    {

    have a lot of field ContentItem

    and painting ContentItem field depending on the paint and drawFocus

    }

    I'm having a problem when I want to focus to ContentItem. How to focus to ContentItem class content. Please help me.

    Thank you, it has been resolved. I just override the navigationMovement method and treat it in the child field

  • Problem with the background and the development

    Hi people!

    I have a little problem with my request, in this application, I have a background (bitmap) and 6 icons (bitmap) focusable.

    OK all going well but the problem is when I move the focus and the first and the last icon gets a white Home > _

    I don't know how to explain it better, but is simple, for example im on the first icon from the left and move to the left, another time and this Dungeon icon the focus but the focus changes to white, on the last icon is the same movement as the focus to the right (the last icon is on the right) and the focus change again in white... , where to move the focus icon back to normal.

    Usually, the icons have image development, I added this to the bitmapfield and eliminated the blue accent.

    protected void (_g, Boolean _on Graphics) drawFocus {//do nothing}

    Hello

    Replace your inside your BitmapField drawFocus() method (free and Ocupado) as below:

    protected void drawFocus(Graphics _g, boolean _on)
    {
         paint(_g);
         invalidate();
    }
    

    Concerning

    Bika

Maybe you are looking for