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-...

Tags: BlackBerry Developers

Similar Questions

  • I have a problem with my laptop does not connect to the internet. It connects to our wireless very well, but it doesn't have an internet connection.

    I have a problem with my laptop does not connect to the internet. It connects to our wireless very well, but it doesn't have an internet connection. It connects to other networks wifi very well with Internet access, is that the wireless in my house what it connects to. When I diagnose the problem, it says "Cannot communicate with DNS server (208.67.222.222)", and then under that it says: "languished network diagnostics remote hosts, but had not received a response." It connects to the Internet through an ethernet cable, but it is rather annoying pulling the cable autour. I currently have Windows Vista Home Premium. Thank you!

    original title: Internet connectivity problem

    Hello

    Now, you may need to contact the support of Panda Internet Security centre to change the settings so that wireless is enabled through it.

    Support link: http://www.pandasecurity.com/homeusers/support/

  • I have problems with my DNS does not. It happens every day.

    I'm having problems recently with the DNS does not.  However, it is not a constant problem.  I have access to internet, and then a few hours later will have no access.  It went back and just 3 times in more than a few days., I do not have anything to temporarily solve the problem, it only happens on its own. This occurs regardless wireless or direct.  Thank you...

    original title: DNS is not responding

    Hello


    1. what operating system is installed on the computer?
    2. were there any changes (hardware or software) to the computer before the show?

    Method 1: Perform the steps mentioned below and see if the problem persists.
    a: click on the button "Start".
    b. in the search box, type "invite."
    c. in the list of results, right-click Guest, and then click run as administrator. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
    d. at the command prompt, type ipconfig/flushdns.
     
    Method 2: Click on the link below and see if the problem occurs.
     
    Method 3: Click on the link below and see if the problem resolves.
     

    Hope this information helps.
  • Apple dvd player will not eject a disc, does not show in the devices

    I'm on El Capitan, the player has played other discs, this disc does not appear

    There is no manual of the dvd drive eject

    drive does not appear in the devices

    Get help with the SuperDrive slot on your Mac - Apple Support loading

    How the disk by force ejecting

    Mac Mini

    How to eject a defective DVD?

  • Place of current residence (Longitude/Latitude) GPS does not work on real device

    Hello

    I wrote a small test application for GPS/latidue longitude. It works fine on simulator (9630), but not on the real device (BlackBerry Tour). Am I missing something? I have to set anything on the device? I already have the data plan activated in the device. Should I have any extra service from the supplier in order to let this GPS thing work?

    Here's my test code:

    public class GPSDemoScreen extends MainScreen implements FieldChangeListener{
        private ButtonField btnGPSTest;
        private EditField edStatus;    
    
        private BBTest bbTest = null;
        private VerticalFieldManager vfManager = null;
    
          // Constants -----------------------------------------------------------------------------------------------------------------
        private static final int GRADE_INTERVAL=5;  // Seconds - represents the number of updates over which alt is calculated.
     //   private static final long ID = 0x5d459971bb15ae7aL; //com.rim.samples.device.gpsdemo.GPSDemo.ID
        private static final int CAPTURE_INTERVAL=5;    // We record a location every 5 seconds.
        private static final int SENDING_INTERVAL=30;   // The interval in seconds after which the information is sent to the server.
    
        // When running this application, select options from the menu and replace 
        // with the name of the computer which is running the GPSServer application found in
        // com.rim.samples.server, typically the local machine.  Alternatively, the _hostName variable
        // can be hard-coded below with no need to further modify the server name while running the application.
    
        private static int _interval = 1;   // Seconds - this is the period of position query.
        private static float[] _altitudes;
        private static float[] _horizontalDistances;
    
         private long _startTime;
        private float _wayHorizontalDistance;
        private float _horizontalDistance;
        private float _verticalDistance;
        private StringBuffer _messageString;
        private LocationProvider _locationProvider;
        //private ServerConnectThread _serverConnectThread;   
    
        /** Creates a new instance of GPSDemoScreen */
        public GPSDemoScreen(BBTest bbtest) {
            super(DEFAULT_MENU | DEFAULT_CLOSE);
            bbTest = bbtest;
    
            initComponent();
        }
    
        private void initComponent(){
            this.setTitle("GPS Demo");
         //   this.bbTest.setBGImage(vfManager, this);
            // Used by waypoints, represents the time since the last waypoint.
            _startTime = System.currentTimeMillis();
            _altitudes = new float[GRADE_INTERVAL];
            _horizontalDistances = new float[GRADE_INTERVAL];
            _messageString = new StringBuffer();
    
            btnGPSTest = new ButtonField("GPS Test", ButtonField.CONSUME_CLICK);
            btnGPSTest.setChangeListener(this);
            edStatus = new EditField( Field.NON_FOCUSABLE);
            edStatus.setText("retriving Longitude and Latitude.Please wait..");
            this.add(btnGPSTest);
            this.add(edStatus);
    
        }
    
         /**
         * Rounds off a given double to the provided number of decimal places.
         * @param d The double to round off.
         * @param decimal The number of decimal places to retain.
         * @return A double with the number of decimal places specified.
         */
        private static double round(double d, int decimal)
        {
            double powerOfTen = 1;
    
            while (decimal-- > 0)
            {
                powerOfTen *= 10.0;
            }
    
            double d1 = d * powerOfTen;
            int d1asint = (int)d1; // Clip the decimal portion away and cache the cast, this is a costly transformation.
            double d2 = d1 - d1asint; // Get the remainder of the double.
    
            // Is the remainder > 0.5? if so, round up, otherwise round down (lump in .5 with > case for simplicity).
            return ( d2 >= 0.5 ? (d1asint + 1)/powerOfTen : (d1asint)/powerOfTen);
        }
    
         /**
         * Invokes the Location API with the default criteria.
         *
         * @return True if the Location Provider was successfully started; false otherwise.
         */
        private boolean startLocationUpdate()
        {
            boolean retval = false;
    
            try
            {
                _locationProvider = LocationProvider.getInstance(null);
    
                if ( _locationProvider == null )
                {
                    // We would like to display a dialog box indicating that GPS isn't supported,
                    // but because the event-dispatcher thread hasn't been started yet, modal
                    // screens cannot be pushed onto the display stack.  So delay this operation
                    // until the event-dispatcher thread is running by asking it to invoke the
                    // following Runnable object as soon as it can.
                    Runnable showGpsUnsupportedDialog = new Runnable()
                    {
                        public void run() {
                            Dialog.alert("GPS is not supported on this platform, exiting...");
                            System.exit( 1 );
                        }
                    };
    
                    UiApplication.getApplication().invokeLater( showGpsUnsupportedDialog );  // Ask event-dispatcher thread to display dialog ASAP.
                }
                else
                {
                    // Only a single listener can be associated with a provider, and unsetting it
                    // involves the same call but with null, therefore, no need to cache the listener
                    // instance request an update every second.
                    _locationProvider.setLocationListener(new LocationListenerImpl(), _interval, 1, 1);
                    retval = true;
                }
            }
            catch (LocationException le)
            {
                System.err.println("Failed to instantiate the LocationProvider object, exiting...");
                System.err.println(le);
                System.exit(0);
            }
            return retval;
        }
          /**
         * Update the GUI with the data just received.
         */
        private void updateLocationScreen(final String msg)
        {
            UiApplication.getApplication().invokeLater(new Runnable()
            {
                public void run()
                {
                    System.out.println(msg.toString());
                    edStatus.setText(msg);
                    Dialog.alert(msg.toString());
                }
            });
        }
    
      public void fieldChanged(Field field, int context){
             if(field.equals(btnGPSTest)){
                startLocationUpdate();
             }
    
         }
        /** Standard Escape-key handler */
        public boolean keyChar(char key, int status, int time) {
            boolean retval = false;
            switch (key) {
                case Characters.ESCAPE:
                   // UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());
                    break;
                default:
                    retval = super.keyChar(key, status, time);
            }
            return retval;
        }
    
         /**
         * Implementation of the LocationListener interface.
         */
        private class LocationListenerImpl implements LocationListener
        {
            // Members ----------------------------------------------------------------------------------------------
            private int captureCount;
            private int sendCount;
    
            // Methods ----------------------------------------------------------------------------------------------
            /**
             * @see javax.microedition.location.LocationListener#locationUpdated(LocationProvider,Location)
             */
            public void locationUpdated(LocationProvider provider, Location location)
            {
                try{
                    if(location.isValid())
                    {
                        float heading = location.getCourse();
                        double longitude = location.getQualifiedCoordinates().getLongitude();
                        double latitude = location.getQualifiedCoordinates().getLatitude();
                        float altitude = location.getQualifiedCoordinates().getAltitude();
                        float speed = location.getSpeed();                
    
                        // Horizontal distance to send to server.
                        float horizontalDistance = speed * _interval;
                        _horizontalDistance += horizontalDistance;
    
                        // Horizontal distance for this waypoint.
                        _wayHorizontalDistance += horizontalDistance;
    
                        // Distance over the current interval.
                        float totalDist = 0; 
    
                        // Moving average grade.
                        for(int i = 0; i < GRADE_INTERVAL - 1; ++i)
                        {
                            _altitudes[i] = _altitudes[i+1];
                            _horizontalDistances[i] = _horizontalDistances[i+1];
                            totalDist = totalDist + _horizontalDistances[i];
                        }
    
                        _altitudes[GRADE_INTERVAL-1] = altitude;
                        _horizontalDistances[GRADE_INTERVAL-1] = speed*_interval;
                        totalDist= totalDist + _horizontalDistances[GRADE_INTERVAL-1];
                        float grade = (totalDist==0.0F)? Float.NaN : ( (_altitudes[4] - _altitudes[0]) * 100/totalDist);
    
                        // Running total of the vertical distance gain.
                        float altGain = _altitudes[GRADE_INTERVAL-1] - _altitudes[GRADE_INTERVAL-2];
    
                        if (altGain > 0)
                        {
                            _verticalDistance = _verticalDistance + altGain;
                        }
    
                        captureCount += _interval;
    
                        // If we're mod zero then it's time to record this data.
                        captureCount %= CAPTURE_INTERVAL;
    
                        // Information to be sent to the server.
                        if ( captureCount == 0 )
                        {
                            // Minimize garbage creation by appending only character primitives, no extra String objects created that way.
                            _messageString.append(round(longitude,4));
                            _messageString.append(';');
                            _messageString.append(round(latitude,4));
                            _messageString.append(';');
                            _messageString.append(round(altitude,2));
                            _messageString.append(';');
                            _messageString.append(_horizontalDistance);
                            _messageString.append(';');
                            _messageString.append(round(speed,2));
                            _messageString.append(';');
                            _messageString.append(System.currentTimeMillis());
                            _messageString.append(':');
                            sendCount += CAPTURE_INTERVAL;
                            _horizontalDistance = 0;
                        }
    
                        // If we're mod zero then it's time to send.
                        sendCount %= SENDING_INTERVAL;
    
                        synchronized(this)
                        {
                            if (sendCount == 0 && _messageString.length() != 0)
                            {
                            //  _serverConnectThread.sendUpdate(_messageString.toString());
                                _messageString.setLength(0);
                            }
                        }
    
                        // Information to be displayed on the device.
                        StringBuffer sb = new StringBuffer();
                        sb.append("Longitude: ");
                        sb.append(longitude);
                        sb.append("\n");
                        sb.append("Latitude: ");
                        sb.append(latitude);
                        sb.append("\n");
                        sb.append("Altitude: ");
                        sb.append(altitude);
                        sb.append(" m");
                        sb.append("\n");
                        sb.append("Heading relative to true north: ");
                        sb.append(heading);
                        sb.append("\n");
                        sb.append("Speed : ");
                        sb.append(speed);
                        sb.append(" m/s");
                        sb.append("\n");
                        sb.append("Grade : ");
                        if(Float.isNaN(grade))sb.append(" Not available");
                        else sb.append(grade+" %");
                        GPSDemoScreen.this.updateLocationScreen(sb.toString());
                    }
                }catch(Exception ex){
                    System.out.println(ex.toString());
                    ex.printStackTrace();
                }
            }
    
            public void providerStateChanged(LocationProvider provider, int newState)
            {
                // Not implemented.
            }
        }
    }
    

    It works fine now, when I tried door.

  • Problem with the laptop does not connect to wifi.

    I have a new laptop to windows 8 toshiba still in the menu setup and he asked me to choose my wifi so I did and put the password and its says unable to connect to wifi, all other laptops and tablets are connected to wifi I chose but its only the my laptop which does not connect. What should I do?

    Hello

    1 have had any changes made on the computer before the show?

    2. do you get an error message? If Yes, what is the exact error message?

    To solve the problem with Wi - Fi internet access, you can follow these methods:

    Method 1:

    I suggest you to refer to the article and see if it helps:

    How can I troubleshoot network card?

    http://Windows.Microsoft.com/en-us/Windows-8/fix-network-adapter-problems

    Method 2:

    I suggest to refer to article and follow these steps:

    Wireless and wired network problems

    http://Windows.Microsoft.com/en-in/Windows/network-connection-problem-help#network-problems=Windows-8&V1H=win8tab1&V2H=win7tab1&V3H=winvistatab1&v4h=winxptab1

    Let us know the results. If you have additional questions on the computer, please ask your question about Windows and we will be happy to help you.

  • 2542: problem with cartridge - mail does not

    I have a problem with printing (scratches on print). Contacted HP via support form and received a mail that I get a new cartridge. So far so good.

    In the HP E-mail additional requests for information (address details), replying to the email does not work, and there is also no way to share the info with HP. How to proceed?

    Hello

    I've included a list of country phone numbers support in the link below.

    http://WWW8.HP.com/us/en/contact-HP/WW-phone-assist.html

  • I have a problem with the touchpad does not not on Windows 7.

    Original title: help. My touchpad scroll has stopped working.

    I have a laptop of Acer Aspire 5750z-4830. Touchpad scrolling does not scroll when I try. How can I put it to the top after that I took it to be repaired? Since I got it home now it won't work. And I don't have the cd to reinstall.

    Hello

    Thanks for posting your question in the Microsoft Community forum. I understand that the touchpad scroll has stopped working.  I'll help you with this problem.

    Before troubleshooting, provide us with information.

    1. don't you make changes to the computer before this problem?

    This problem may occur if there are some differences in the file system or the associated scroll Touchpad drivers. Follow these methods:

    Method 1.

    Open the hardware and devices Troubleshooter: http://windows.microsoft.com/en-us/windows7/Open-the-Hardware-and-Devices-troubleshooter

    Method 2.

    You can also follow this link and check if that helps.

    Mouse, touchpad and keyboard under Windows problems: http://windows.microsoft.com/en-us/windows/help/mouse-touchpad-and-keyboard-problems-in-windows

    Method 3.

    Check if control panel touchpad mouse is enabled or not. Follow these steps.

    1 - click on 'start '.

    2 - Select 'Control Panel' click the icon of the '' mouse. '' If you don't see the mouse icon, select Classic view of the control panel.

    Tab 3 - Click the "peripheral" in the window that appears. Select the 'enable '.

    4 button - Click on the 'apply' and select 'OK '.

    Method 4.

    Alternatively, you can also try the following steps.

    1 - Locate the "Fn" button in the lower right or left side of the keyboard of the laptop. The 'Fn' key has different text color on it or the key itself is a different color.

    2 look for the function key (F1-F12) on the top of the keyboard that disables or active the touchpad on the laptop. The key usually has an icon that looks like a touch pad with a finger touch she or a touchpad with a diagonal line through it.

    3 - Press "Fn" both the touchpad function key simultaneously to reactive the touchpad on your laptop. Move your finger on the touch pad to make sure it works. Press to disable the touchpad again at any time.

    If you need help on this particular issue or any other related Windows issue, let know us and we will be happy to help you.

  • Another problem with socket: socket does not receive the although it is ready

    Hello!

    I read a lot of discussion about the casings, but I wasn't able to find a working solution:

    I know that RIM has changed many things in this regard in the OS 5.0, but I would like to improve my old 4.7 code so that it works on both BONES.

    I have a socket connection between my desktop pc and my BlackBerry storm (and "BOLD"). It works fine on 4.7 well everything what socket sends is mixed to the top when it arrives. That is not the real problem, but if someone has a tip for me - would be great!

    For this I use wap2.

    5.0 it sends all clear (large), but my code reception does not work. He knows what data happens by checking. the InputReaderStream ready(). I think it works, it's always a good time. Then, I'm reading by. read(). Still, it blocks and waits while there is something. But it does start to read something (!) until the connection is closed by the other side (my desktop pc).

    Can you give me a clue what I'm doing wrong?

    This only happens on the device, not in the Simulator!

    That's what I tried:

    -with the help of a DataInputStream (I wasn't able to find a difference)

    -using another overload of. read()

    P.S. Get rid of InputStreamReader and use the InputStream.read (void) method directly to read a byte at a time.

  • Problems with a JotForm is not showing is not on all breakpoints

    I have a sensitive contact of JotForm form and it does not appear on all breakpoints. JotForm support told me that the div I use to insert the form has implemented the rules don't not to display smaller screen sizes. This is not correct. I am insert the code for the form by using the insert HTML and the form is set to display on all breakpoints. Muse support told me that the html of the form is in conflict with the html code generated by Muse. After all this, my form still does not appear, and still don't know where is the problem. Can someone help, please?

    The form is here:

    Contact

    Thank you.

    It worked for me:

    In Muse, delete the HTML element that contains the form. In JotForm, go to your form, click on publish, incorporate, and then choose the options to embed iFrame. Return to Muse, add a new element of HTML and paste the iFrame in it. Publish your site.

    It worked for me and the shape is now visible on all breakpoints. This solution was given to me by the support of JotForm.

  • Having a problem with my page does not stop scrolling?

    Hi, I am very new to Muse and have been plugging away learning and design. I came across a new issue where when I go to preview my site, that my pages are not self limiting the amount of content I have on her page, if that makes sense.

    On one page, I have a picture of style small hovering with a small text below, does not come close taking over my office around, but there are still some amount scroll down on the page. On another page I have an image gallery and if you scroll down it just guard putting a space more photos below and you can scroll basically forever. Any contributions to this issue would be greatly appreciated.

    Thanks, Ben

    That's great! An easy solution: simply omit the widget!

    I paid for the widgets (like others) that presented of problems... when all else fails, stick to what provides the Muse. Frustrating at times, but they do not work.

    (Can also be useful to meet with the developer and asking for a solution/explanation)

  • Problem with complex schema does not

    Hello

    I created the fairly complicated pattern: http://i.imgur.com/Wt2Bo7w.png

    And when I'm playing with him (some pathfinder to the cutting edge etc.) Illustrator is "not responding" problem and after a few minutes it comes back to life (with process finished). It's weird because my machine is pretty good and Illustrator, while that "does not" use only 30% of my CPU and about 6 GB of ram (I've got 16 GB). Is there a way to make it faster? What would you recommend?

    Try using fill patterns.

    Or try to use overlays raster graphics

  • Problem with Photoshop CC does not work after update

    I downloaded and installed Photoshop CC yesterday and worked with it without any problems. This morning, the cloud said that there is an update

    So I installed which.

    Now, the program will open but it does not meet anything, I can't access any of the Menus or load an image. The only way I can close

    is the hit Control-Alt-Delete.

    What can I do to fix this?

    David

    Hi dneely101,

    Please see the Ko: http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html .

    Kind regards

    Romit Sinha

  • Strange problem with addinstance, first page not save

    So I spent some time designing a form for a local police department to facilitate their reports.  I'm having a strange problem using addinstance.

    Use the two separate sections of the addinstance form; subject/witnesses/victims and the narrative section.  The two sections have buttons add and remove additional if necessary pages.

    • The witness/subject/victim section works as expected, additional pages can be added or removed, and they are preserved when you save the document, and then reopen the document
    • The narrative section does not work as expected, other pages can be added or removed.  The problem comes when the document is reopened, the first page which is generated using addinstance is no longer present in the file, all the pages generated after the first page that has been deleted remains.  It is extremely strange, and I have no idea what is the cause.

    Some possibilities I have already looked at in

    • Document is saved in dynamic form
    • Type of the Interactive preview
    • form is presented in preview as a form xml dnymaic
    • automatically keep your changes to scripts to form when registering
    • I use acrobat x to activate additional features so that end users can fill in the form and save it using the adobe reader software

    Here is the link to the file, I have been unable to share via acrobat.com http://www.FileSwap.com/DL/kp2BTWSTQR/

    Any help would be greatly appreciated, I have no idea on how to solve this problem!

    -ian

    Hi Ian,

    I think you have little code in the form1 docReady event that are causing you problems.  There are also exceptions to come JavaScript, it looks like test code, but you got "display the console on errors and messages" in Reader/Arobat (Edit... Preferences... JavaScript)

    Good luck

    Bruce

  • I'm having a problem with my flash does not videos in youtube and loading games on facebook. Any ideas?

    Videos won't load on youtube.
    Games will not load on facebook.

    Hello ron, this is most likely a problem in the context of the recent update of the adobe flash plugin, please see the following article for common solutions: 11.3 Flash does not load video in Firefox

Maybe you are looking for

  • Firefox does not open after a reboot

    After I updated Firefox, it will work until I restart my computer. So simply, it opens at all and finally will come with an empty window that is not responding. I had this problem for months and just switched to Google Chrome because I had no time to

  • The + to add a tab is mising and I do not have access to the tab group. I just downloaded Firefox to a new Windows 7 computer.

    I use a brand new Win 7 computer. I downloaded Firefox thinking it would be just the same as my previous version-8. ? I don't + on the tab toolbar to add a new tab. In addition, I loved the group by tabs and used a lot. All of the boxes in the upper

  • frequency and tone of "Please update firefox 6.0" nag seem suspicious

    I do not remember nagging Firefox with such insistence that the only safe version was a major version number higher than the new facility of the default download of the previous day (5.0.1 August 15). What was even more disconcerting was that I knew

  • iTunes conversion of WAV files

    I am in itunes on a pc running Windows 7 is more the opportunity to convert songs to mp3. I can, however, convert to WAV files. I don't understand not the point of this, because itunes purchases are downloaded to the lossy AAC format. How can these f

  • Bottleneck of Wi - Fi WRT160N

    I have recently known bottlenecks to speed wireless with my WRT160N router.  When my laptop (and my roommates) are wired directly to the router, we can achieve expected download speeds (about 20 MB/s, which is what we pay for).  But what connection v