rim-4.2

Cancel scrolling in Layout Manager

南楼画角 提交于 2019-12-12 05:27:32
问题 I can't find solution for the following problem. I have custom list field, which overlaps the boundaries of its layout manager. List field consumes navigation events from manager to highlight currently selected row with special color. Layout manager is configured to support scrolling. When I scroll trackwheel down, layout manager invokes scrolling and then passes navigation event to its child, the list field. It results in inproper scrolling, because manager scrolls the whole list down to its

How to detect available APN settings?

最后都变了- 提交于 2019-12-11 16:45:17
问题 I need to access somehow APN settings in my BlackBerry application. My app is running on JDE 4.2.1. Any help? 回答1: There's a class called ServiceRecord that can take care of this for you. Here's a short snippet. ServiceRecord record = ServiceBook.getSB().getRecordByUidAndCid(uid, cid); String apn = record.getAPN(); The uid and cid are dependent on what service you are trying to use (i.e wap, wifi or something else). You can retrieve a complete list of all the ServiceRecord objects by using

Calling atan function on Blackberry 4.2 JDE

爱⌒轻易说出口 提交于 2019-12-11 03:11:33
问题 I need to calculate the arc tan value from my Blackberry Java app. Unfortunately, the blackberry 4.2 api doesn't have the Math.atan() function. Version 4.6 of the Blackberry JDE has it, but not 4.2. Does anyone know of a workaround to calculate atan? 回答1: From Arctan in J2ME by Stephen Zimmerman: // calculation functions public class Calculation { // Because J2ME has no floating point numbers, // some sort of fixed point math is required. // My implementation is simply to shift 10 places. //

How should I strip invalid XML characters from a stream in J2ME? org.xml.sax.SAXParseException: Invalid character

自古美人都是妖i 提交于 2019-12-06 14:21:56
问题 This code is running on Blackberry JDE v4.2.1 It's in a method that makes web API calls that return XML. Sometimes, the XML returned is not well formed and I need to strip out any invalid characters prior to parse. Currently, I get: org.xml.sax.SAXParseException: Invalid character '' encountered . I would like to see ideas of a fast way to attach an invalid character stripper on the input stream so that the stream just flows through the validator/stripper and into the parse call. i.e. I'm