Search Results

Search found 2086 results on 84 pages for 'blackberry simulator'.

Page 40/84 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Customized listfield with image displaying from a url

    - by arunabha
    I am displaying a customized list field with text on the right side and image on the left side.The image comes from a URL dynamically.Initially i am placing a blank image on the left of the list field,then call URLBitmapField class's setURL method,which actually does the processing and places the processed image on top of the blank image.The image gets displayed on the list field,but to see that processed image i need to press any key or click on the list field items.I want the processed image to be displayed automatically in the list field after the processing.Can anyone tell me where i am getting wrong? import java.util.Vector; import net.rim.device.api.system.Bitmap; import net.rim.device.api.system.Display; import net.rim.device.api.ui.ContextMenu; import net.rim.device.api.ui.DrawStyle; import net.rim.device.api.ui.Field; import net.rim.device.api.ui.Font; import net.rim.device.api.ui.Graphics; import net.rim.device.api.ui.Manager; import net.rim.device.api.ui.MenuItem; import net.rim.device.api.ui.UiApplication; import net.rim.device.api.ui.component.BitmapField; import net.rim.device.api.ui.component.Dialog; import net.rim.device.api.ui.component.LabelField; import net.rim.device.api.ui.component.ListField; import net.rim.device.api.ui.component.ListFieldCallback; import net.rim.device.api.ui.component.NullField; import net.rim.device.api.ui.container.FullScreen; import net.rim.device.api.ui.container.MainScreen; import net.rim.device.api.ui.container.VerticalFieldManager; import net.rim.device.api.util.Arrays; import net.rim.device.api.ui.component.ListField; public class TaskListField extends UiApplication { // statics // ------------------------------------------------------------------ public static void main(String[] args) { TaskListField theApp = new TaskListField(); theApp.enterEventDispatcher(); } public TaskListField() { pushScreen(new TaskList()); } } class TaskList extends MainScreen implements ListFieldCallback { private Vector rows; private Bitmap p1; private Bitmap p2; private Bitmap p3; String Task; ListField listnew = new ListField(); private VerticalFieldManager metadataVFM; TableRowManager row; public TaskList() { super(); URLBitmapField artistImgField; listnew.setRowHeight(80); listnew.setCallback(this); rows = new Vector(); for (int x = 0; x <3; x++) { row = new TableRowManager(); artistImgField = new URLBitmapField(Bitmap .getBitmapResource("res/images/bg.jpg")); row.add(artistImgField); String photoURL = "someimagefrmurl.jpg"; Log.info(photoURL); // strip white spaces in the url, which is causing the // images to not display properly for (int i = 0; i < photoURL.length(); i++) { if (photoURL.charAt(i) == ' ') { photoURL = photoURL.substring(0, i) + "%20" + photoURL.substring(i + 1, photoURL.length()); } } Log.info("Processed URL: " + photoURL); artistImgField.setURL(photoURL); LabelField task = new LabelField("Display"); row.add(task); LabelField task1 = new LabelField( "Now Playing" + String.valueOf(x)); Font myFont = Font.getDefault().derive(Font.PLAIN, 12); task1.setFont(myFont); row.add(task1); rows.addElement(row); } listnew.setSize(rows.size()); this.add(listnew); //listnew.invalidate(); } // ListFieldCallback Implementation public void drawListRow(ListField listField, Graphics g, int index, int y, int width) { TableRowManager rowManager = (TableRowManager) rows.elementAt(index); rowManager.drawRow(g, 0, y, width, listnew.getRowHeight()); } protected void drawFocus(Graphics graphics, boolean on) { } private class TableRowManager extends Manager { public TableRowManager() { super(0); } // Causes the fields within this row manager to be layed out then // painted. public void drawRow(Graphics g, int x, int y, int width, int height) { // Arrange the cell fields within this row manager. layout(width, height); // Place this row manager within its enclosing list. setPosition(x, y); // Apply a translating/clipping transformation to the graphics // context so that this row paints in the right area. g.pushRegion(getExtent()); // Paint this manager's controlled fields. subpaint(g); g.setColor(0x00CACACA); g.drawLine(0, 0, getPreferredWidth(), 0); // Restore the graphics context. g.popContext(); } // Arrages this manager's controlled fields from left to right within // the enclosing table's columns. protected void sublayout(int width, int height) { // set the size and position of each field. int fontHeight = Font.getDefault().getHeight(); int preferredWidth = getPreferredWidth(); // start with the Bitmap Field of the priority icon Field field = getField(0); layoutChild(field, 146,80); setPositionChild(field, 0, 0); // set the task name label field field = getField(1); layoutChild(field, preferredWidth - 16, fontHeight + 1); setPositionChild(field, 149, 3); // set the list name label field field = getField(2); layoutChild(field, 150, fontHeight + 1); setPositionChild(field, 149, fontHeight + 6); setExtent(360, 480); } // The preferred width of a row is defined by the list renderer. public int getPreferredWidth() { return listnew.getWidth(); } // The preferred height of a row is the "row height" as defined in the // enclosing list. public int getPreferredHeight() { return listnew.getRowHeight(); } } public Object get(ListField listField, int index) { // TODO Auto-generated method stub return null; } public int getPreferredWidth(ListField listField) { return 0; } public int indexOfList(ListField listField, String prefix, int start) { // TODO Auto-generated method stub return 0; } }

    Read the article

  • Placement of ButtonField

    - by rupesh
    Hi i want to place the Buttons as displayed in the image: for this i am using the following code but it is not working for me can any one please help me out topbarManager = new HorizontalFieldManager(); topbarLeftManager = new HorizontalFieldManager(Field.FIELD_LEFT); topbarRightManager = new HorizontalFieldManager(Field.FIELD_RIGHT); topbarCenterManager = new HorizontalFieldManager(Field.FIELD_HCENTER); topbarLeftManager.add(new ButtonField("first")); topbarRightManager.add(new ButtonField("second")); topbarCenterManager.add(new ButtonField("third")); topbarManager.add(topbarLeftManager); topbarManager.add(topbarCenterManager); topbarManager.add(topbarRightManager); i am not getting the result as i required. can any one please Help me out. Thanks a lot

    Read the article

  • Editing a BrowserField's History

    - by Woody
    I have a BrowserField in my app, which works great. It intercept NavigationRequests to links on my website which go to external sites, and brings up a new windows to display those in the regular Browser, which also works great. The problem I have is that if a user clicks a link to say "www.google.com", my app opens that up in a new browser, but also logs it into the BrowserHistory. So if they click back, away from google, they arrive back at my app, but then if they hit back again, the BrowserHistory would land them on the same page they were on (Because going back from Google doesn't move back in the history) I've tried to find a way to edit the BrowserField's BrowserHistory, but this doesn't seem possible. Short of creating my own class for logging the browsing history, is there anything I can do? If I didn't do a good job explaining the problem, don't hesitate for clarification. Thanks

    Read the article

  • Developing cross platform mobile application

    - by sohilv
    More and more mobile platforms are being launched and sdk's are available to developers. There are various mobile platform are available, Android,iOS,Moblin,Windows mobile 7,RIM,symbian,bada,maemo etc. And making of corss platform application is headache for developers. I am searching common thing across the platforms which will help to developers who want to port application to all platforms.Like what is the diff screen resolution, input methods, open gl support etc. please share details that you know for the any of platform . or is there possibilities , by writing code in html (widget type of thing) and load it into native application. I know about the android , in which we can add the web view into application. by calling setContentView(view) Please share the class details where we can add the html view into native application of different type of platforms that you know. Purpose of this thread is share common details across developers. marking as community wiki. Cross platform tools & library XMLVM and iSpectrum (cross compile Java code from an Android app or creating one from scratch Phone Gap (cross platform mobile apps) Titanium (to build native mobile and desktop apps with web technologies) Mono Touch ( C# for iphone ) rhomobile - http://rhomobile.com/ samples are here: http://github.com/rhomobile/rhodes-system-api-samples Sencha Touch - Sencha Touch is a HTML5 mobile app framework that allows you to develop web apps that look and feel native on Apple iOS and Google Android touchscreen devices. http://www.sencha.com/products/touch/ Corona - Iphone/Ipad / Android application cross platform library . Too awesome. http://anscamobile.com/corona/ A guide to port existing Android app to Windows Phone 7 http://windowsphone.interoperabilitybridges.com/articles/windows-phone-7-guide-for-iphone-application-developers

    Read the article

  • readUTF timeout

    - by Hassan Voyeau
    I am getting a timeout with the following code at readUTF. Any idea why? hc = (HttpConnection) Connector.open("http://twitter.com/statuses/user_timeline/" + username + ".json"); int rc = hc.getResponseCode(); if (rc != HttpConnection.HTTP_OK) { throw new IOException("HTTP response code: " + rc); } DataInputStream dataInputStream = hc.openDataInputStream(); String list = dataInputStream.readUTF();

    Read the article

  • Most cost effective way to target multiple mobile platforms

    - by niidto
    Hi I have been given the tasks of speccing a mobile application, which will need to run on approx. 1000 devices. These devices already exist, and consist of iPhones, BlackBerrys, Androids, Windows Mobile and Netbooks. The application will have simple reporting capability, and a collection of forms. Anyway, the obvious solution would be to develop some browser based solution, although given the occasionally connected nature of the devices, there's a potential for data to get lost / not saved. So instead of creating a complex application for each platform, I was thinking we could build what is effectively a form generator, with basic offline storage capability (text files), designed to run on each device, and have the device generate a form, based on for example an XML file that it could request from a server somewhere, resulting in minimal specialist development costs, and the ability to run most of the logic from the server end, with the devices being dumb clients that render forms and upload the data when there is an available connection. Anyway, my question summarised is, how have you made the decision on supporting multiple devices for your application. Is this always an unavoidable problem, and you just have to make the call to support 1 or 2, or pay for developers to write code for each platform, or alternatively supply pre-installed devices to the company? Many thanks James

    Read the article

  • AIR for Android, Flash iphone packager, Playbook support for streaming camera and choosing camera

    - by mswallace
    I am wondering if anyone can definitively tell me if Flash / AIR can find all these mobile devices front facing camera and use RTMP to stream the video captured ? I would like to create a video conferencing app for these devices. Of course none of them support testing this in the simulators and I don't have the funds to purchase or access all of them that I would like to test. Wondering if anyone can shed some light on this for me. I have seen some posts where they have done this for android but not sure about support for finding a list of cameras, choosing one and streaming from iphone 4 and playbook. thanks for any help on this.

    Read the article

  • Weather API to mobile platform

    - by Alex
    Hello everybody! I would like to ask from you guys/girls somebody used radar image api in MOBILE PLATFORM? I got some good provider but the user agreement don`t allow to use it in mobile platform. Even some good weather forecast API exists? (with moon phase,5-7 days forecast) and radar images ? Maybe search by US zip code?

    Read the article

  • HorizontalFieldmanager overlay

    - by Dachmt
    Hi, I have a VerticalFieldManager that takes all my screen, and I want to put an HorizontalFieldmanager at the bottom of the screen (menu bar that appear and disappear like the WeatherEye menu bar) that overlay the VerticalFieldManager. Any idea? I think it's something with overwriting the paint or sublayout methods but I have no clue how to implement this... Thanks to Max, I have almost everything, but in my other post it resize the VerticalFieldManager instead of having the HorizontalFieldmanager overlaying it. Thank you!

    Read the article

  • Could not install appliation via Desktop Manager..

    - by tek3
    I am trying to install an application onto my device..I have compiled the application using JDK 4.5.0 and also signed it with RIM signing keys...But i am unable to install my application onto my device(8900) through desktop manager..It keeps on showing "application is not compatible with your device and cannot be loaded"... Since i have compiled my application in JDK 4.5, it must be compatible with all devices having OS 4.5.0...Any pointers to what might be going wrong??? Is there any version miss match??

    Read the article

  • Custom HorizontalFieldManager menu not showing

    - by BLeB
    I have created a class that extends HorizontalFieldManager so that I can display a label and an image on the same line with the label to the left and the image to the right. I want the user to be able to interact with the hfm as if it were a single field. I have everything working (focus, click action, etc) except the menu. When I press the menu button makeMenu and makeContextMenu are not called. How do I make it so that the correct menu shows when the menu button is clicked and focus is on the hfm? Am I going about this the wrong way?

    Read the article

  • richfield problem

    - by jutt.chattha
    0 i am get the from the web and store in the rich text field but only one line show other all data is hidden if i hard coded show the all data but when we get the data base through web show only one line. the code reff is private RichTextField textOutputField; textOutputField.insert(""+GlobalDataStore.chatee+":" + bufVal+"\n");

    Read the article

  • Adding fields until screen is full

    - by Eric
    For the sake of this question, let us suppose that I want a row of buttons. I want to put as many buttons in that row as I can fit on the screen, but no more. In other words, as long as a prospective button will not be cut off or have its text shortened, add it. It seems that I should be able to do something like: HorizontalFieldManager hfm = new HorizontalFieldManager(); int remainingWidth = Display.getWidth(); int i =0; while(true) { ButtonField bf = new ButtonField("B " + i); remainingWidth -= bf.getWidth(); if(remainingWidth<0) break; hfm.add(bf); i++; } add(hfm); But this doesn't work. bf.getWidth() is always 0. I suspect that this is because the button has not yet been laid out when I query for the width. So, perhaps I could just make sure the buttons are always the same size. But this won't work for a few reasons: Different BB platforms have different looks for buttons and text that will fit on a button on a Curve won't fit on a button on a Storm. 3rd party themes may change the look of buttons, so I can't even count on buttons being a certain size on a certain platform. Is there no way for me to actually check the remaining space before adding a button? It feels like a fairly useful feature; am I just missing something?

    Read the article

  • Free icons for mobile applications. Where?

    - by Geltrude
    I know that in the sdk folders I can find some (not very well grouped, imho) icon. But, there is a site online specialized that let you download free icons useful for mobile app? Ie world flags, up, down... save, revert..., next..., play, stop..., etc. It would be more appriciated also if you can find these sets in many different colors, and in 2 or 3 sizes (32x32, 64x64, etc.). Have a nice day (ot. Especially my mom - her 62 birthday :-) Edit: those are all good sites, but to green-check the answer I need a small set with the common icons (I think moreabout 50-70 icons), in many different colors and in 2 or 3 different sizes (for lo-mid-hi definition devices). - If a so done site exists for free :-)

    Read the article

  • Network Differences

    - by Chris
    I am busy working on a java app to run on blackberries but on some devices i am testing on, the code does not seem to be working and im having a hard time pinpointing where the problem lies. My question is: Could the problem with some phones working and not working have t odo with the type of network they are running on such GSM vs CDMA and would the code that stops working on some devices be in one of the following areas: 1) Listeners - such as MessageListener and Phone Listener 2) UI Objects - simple test labels and buttons 3) Connection to a web service using ksoap2

    Read the article

  • How to change the picture of CustomButtonField on click event?

    - by Ujjal boruah Vinod
    I have posted this question previously but the answer is not appropiate. The solution provided just change the picture when the custombutton has focus and unfocus. Suppose in my application I need to change the picture if the user clicks on the customButton, n i m doing this by calling the same screen (ie UiApplication.getUiApplication().pushScreen(new Screen2(b));) . Screen2 is the screen which holds the customButton. On the click evevt i m pushing the same screen by passing aint variable pic_status that determines which picture to be drawn in the CustomButton in the new screen. Is there any way to update the picture in the CustomButtonField on click event without pushing the same Screen again and again. //code in Screen2 public void fieldChanged(Field field, int context) { if(field == bf1) { if(pic_status == 0) { pic_status=1; } UiApplication.getUiApplication().pushScreen(new Screen2(pic_status)); } //code in CustomButtonField CustomButtonField(String label,int pic_status,long style) { super(style); this.label = label; this.labelHeight = getFont().getHeight(); this.labelWidth = getFont().getAdvance(label); this.notice = s; if(pic_status ==0) { currentPicture1 = onPicture; currentPicture2 = onPicture; } if(pic_status ==1) { currentPicture1 = clickPicture; currentPicture2 = onPicture; } if( pic_status==2 ) { currentPicture1 = onPicture; currentPicture2 = clickPicture; } } I need a way to update the customButtonField text and picture on the buttonClick event not on focus/unfocus event without pushing the same Screen again and again. If my above description of problem is not satisfactory, plz add a comment n i can give more details explanation of my problem?

    Read the article

  • Java how does Key Event Handling Mechanism(KeyListeners notified) work ?

    - by Carbonizer
    How does application/JVM know which classes if implemented key handling interfaces ? Does it use java Reflections or does it check all the classes for methods ? How can a application or executing JVM understanding to deliver the user event or call the specific methods on a class that implemented the keylistener interface. Does it look at all the classes if those methods are implemented or how does it know which classes implmented keylistener interface ? If you dont implement the keylistener Interface for a class but still implmentation all its methods. Do the class still process the user event occurred ?

    Read the article

  • AbstractPhoneListener not responding second time:

    - by java-webline
    --I use custom screen on call initiated , connected, disconnected with blackberry5.0. First time when invike call , application can get respond of every event like call initiated , call connected, call disconnected and shows respected custom screens. --After call disconnected , it shows the custom call history of my application. --Now from my application when user click back button, it shows device call logs. --Now on back it will return control to my application from where user can initiate call. --But this time, When user invoke call from application ,phone listener is added but it shows device call screens not mine custom call screens.Phone listener not responding this time.

    Read the article

  • Refresh Service List of a paired Bluetooth device !

    - by sas-san
    Hi- Is there any possibility to refresh the service list of a paired device in a programm? At the moment, i have to go to the bluetooth options and select the device properties of the bluetooth device and have to refresh the service list manually. Is there any API that RIMM provides to do programmatically? thanks,

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >