How to create ListField containing image and multilnes text in a row -- blackberry - blackberry

I want to create ListField .In each row of Field i want to display image on the Right and text on the left.I am using the ListField and callback.The text and image is getting displayed but the text is overwriting on the image and also if i change the order i.e image on left and text on the right then the text is getting truncated and only a single line is coming where as the text is of multiple lines .So anyone could you please give an idea of how to proceed or way to do
thank you

Which OS version are you using? If you are using OS6 or higher, consider using a TableView(and associated TableModel and TableController) . Its DataTemplate feature allows you more control over the layout of each row.
If you still want to use a ListField then you should show the code you are having trouble with.

Check out the BlackBerry Advanced UI components here: http://supportforums.blackberry.com/t5/Java-Development/Implement-advanced-buttons-fields-and-managers/ta-p/488276
In particular check the ListStyleButtonField example.
Zip file containing Example BlackBerry Project:
http://supportforums.blackberry.com/rim/attachments/rim/java_dev#tkb/399/4/Advanced%20UI.zip
Once downloaded, do the following:
Extract the Advanced UI folder to your local machine
Open Eclipse and goto File->Import->Existing Project into workspace
Choose the Advanced UI folder as the root folder
The Advanced UI project will then be imported into Eclipse and you should be able to build and run the sample application on the BlackBerry simulator. Once you see how ListStyleButtonField works you can copy it into your project, or modify it to your specific requirements.
Note that you may have to set your compiler compliance level to 1.3 to get this working. Do this under Project Settings->Java Compiler

Related

How to swap iOS splash page image based on build configuration in Xamarin Forms application

I have a Xamarin forms application and I have requirement to change the iOS splash page image (.png) configured in the LauchScreen.storyboard file based on a build compilation symbol. (ie, If the build configuration symbol "TEST-ENVIRONMENT" is defined, then display image-1.png on the splash page otherwise use image-2.png). I thought maybe I could swap images by specifying a command to copy the appropriate image file in the Pre-build event but since they are Embedded Resources, I don't see how it could be done. I'm at a loss as to how I can do this.
Thanks!
No, I don't think you can change the image in the LaunchScreen.storyboard at run time.
You can't assign a custom class to LaunchScreen.storyboard.
When launch screen image is being displayed, your app is in the loading state and you can't execute any code at that point.
The way I recommend you to do is create two LauchScreen.storyboard files for different configuration symbol and before you build your project, choose the right LauchScreen.storyboard file to build.
Refer: execute-code-in-launch-screen
in-ios-how-to-change-launchscreen-image-according-environment-dev-hom-prod

Template Dialogue Box not showing up when trying to create a new file in a Xcode Workspace

When I right click to add a new file (or do File -> New -> File), I don't get a dialogue box asking me which Template I want to use. It just creates a blank file like this:
I tried renaming it to a .swift file and adding in all the necessary code to start off, but two things happen:
First, the autocomplete function is one step behind. So when I've already typed import UIKit and moved on, it starts trying to autocomplete UIKit. And when I've already typed class className: UICollectionViewController {
} and moved on, it starts trying to autcomplete UICollectionViewController
After I manually type in the bare minimum needed to make a swift file into a UICollectionViewController with a colored background, I can't reference it in my other files.
I can only assume this is because of the lack of a template dialogue box, but maybe I'm wrong. Is there any way to toggle this template dialogue box on or off?
This problem is only happening with this particular project since I updated to Xcode 10.1
I can't seem to find anyone else online who's already had this issue. The only similar questions I found online were referring to creating reference folders rather than groups. I didn't find anything regarding the file template dialogue box not showing up.
I fixed this and I'll post the answer in case anyone else comes across this problem.
It was tedious, but I:
Created a new project
Initialized my podfile, added what was in the previous one, and installed it
Opened up the new workspace
Added each file one by one
Maybe there's an easier/quicker way to do it, but after looking through all the settings and not finding anything, I ended up doing this and it worked.
Check that in the left hand pane displaying your project structure you are adding the new file to a folder which comes under your application (identified by a blue Xcode application icon) instead of a general folder as your top level (identified by a blue folder icon). I can't add images yet so please see link.

Simulate printing for ePOS-print iOS sdk

I am using epos sdks for printing in my app. I don't have printer to check the exact output of the printed bill. So is there any way to simulate the output without printer by using epos iOS SDK?
Please download the sdks from the following location https://download.epson-biz.com/modules/pos/index.php?page=single_soft&cid=4768&scat=50&pcat=7
1. Unzip the downloaded file(if it not done automatically) and go to the javascript folder.
2. Unzip "ePOS-Print_Sample_SDK_V5.0.1E" and check for the folder "editor".
3. Open the folder and right click on the 'index.html' file and open it using any browser.
4. Use the edit to enter the input and check the output in preview tab.
You can use EPSON's ePOS XML Editor. I've published the source code for it in a public repo and added a Github Page so it's easier to find and use.
You can find it here: https://franciscohanna.me/epson-epos-xml-editor/.
In the editor, you can drag and drop elements and use the Preview tab to have an approximate preview of the print.

Where is the Deployement Screen

I am trying to keep my application in the background on the iOS platform using firemonkey.
I have came across an answer witch tells me how to make the application remain in background.
Here is the answer:
You'll need to copy the info.plist file and modify it using a unix EOL
friendly editor (such as Notepad++). Add the following lines to it:
UIBackgroundModes voip
In the Deployment screen for your project, uncheck the original
.info.plist, and add the copy you modified. Note that if you
change any project options that changes the original, you'll need to
go thru this process again, or just reflect the changes in the
modified file.
How ever I can't figure out where is the Deployment screen. Does anybody know ?
(NOTE: I don't do iOS development, so this info is based on some quick experimentation with a new iOS FMX project in XE5.)
Those instructions are for XCode, which isn't Delphi. Delphi doesn't have the XCode deployment screen.
The Delphi equivalent is in Project->Deployment from the IDE main menu. You can locate the .plist file in the Local Name column, in the form YourProject.info.plist. I think the original copy is actually generated when you build your project for deployment (either Release or Debug) to the simulator or device, so you may have to do that first in order to find it.
If you look at the samples for XE5 (which seems to be the one in Samples\Delphi\DataSnap\connectors\iOSClients\client_company_tweet), you can see where they're located once the file has been generated.

Using a custom component

I'm making an application that has to do with World of Warcraft.
To keep it short; You can pick talents that give you certain skills, in my application I added a talent calculator. Here you can pick talents, each talent has a description.
This is shown, like all spells and items, in a tooltip. For an example check here and hover over one of the talents.
So I want to make these tooltips too.
To do this I created a custom component following 2 guides
Guide 1 here
Guide 2 here
Now I made my component based on a panel. Made a package and installed it which all works.
It also shows in the list of components at design time.
Then I drag it onto my form, it gets automaticly included in the uses however...
When I try to run/build/compile my application I get an error and it says:
Cannot resolve unit name 'Tooltip'
and I have no idea how to fix this.
There are plenty tutorials that show you how to make a custom component but none of them talks about this problem. Am I doing something wrong?
Any advice will be very welcome :)
You have to setup the common library path and search path.
Open from IDE-Menu Tools\Options
Walk to Environment Options\Delphi Options\Library
Edit Library Path and add the Path containing the component compiled libraries (.dcu files) or the path containing the component source files
Edit Search Path and add the Path containing the component source files (this is optional but helpful when debugging)
You have to repeat theses steps for all platforms your component will be used. But if you put the library path to compiled libraries, you have to ensure the right .dcu for the platforms.

Resources