set background image for objectchoicefield in blackberry - blackberry

How to set background image and how to set width and height for ObjectChoiceField in blackberry.

I suggest you to ask google before you ask the question on stackoverflow :) Btw, Here is a sample code which will let you know how to set images as background for the objectchoicefield Here is the Sample code

Related

Button background alignment

I'm a long-time web dev trying to get into iOS development and Xcode so please forgive me for the simplest of questions.
I have a strange issue when I cannot centre align button text within a button's background image. Please see the screenshot below. At the moment you can see the text sits right aligned to the background image.
It’s not a background image. Think of it more like an icon.
It looks like you might want to set your Style to “Default”. Then it will show a background field under image

Resizing Image in Xcode?

Is there any way I can resize an image that I copy into my project, according the the size I need in pixels for example maybe I want to reduce the height and width by 100px then add it to my imageView or any other object. are there any tools that Xcode provide within the Xcode. I want to do it using interface without any programming so is there any way?
The simple answer would be "NO".
I do not aware of any way to use Xcode resizing images.
The easiest method for me is to right click on any image and select "Open with External Editor". Preview should be opened and the app is quite simple to use.
Assuming that you are referring to the layout in storyboard/IB.
To get the native size of the image just select the image and press Command + = on the keyboard. the to re-size it proportionally select the corner and hold down the shift key when you re-size it.

Set an image as background for all screen resolutions

I'm in trouble with the design part of my app and I hope someone will be able to help me. Here is the description of my problem:
I would like to put an image in background of all views of my app adapting all screen resolutions. My designer has given to me these background images in different sizes (for all devices, iPhone and iPad). I'm not using size classes because it's an old project. I have two storyboards: one for iPad devices and another one for iPhone devices. I created an UIImageView, put it on my view in storyboard and added the good constraints (stick to all sides)
I tried two methods to achieve my goal:
Using the slicing method but the problem is I have some logos on my
image and it become difficult to slice.
Using the Mode of the image in storyboard like Aspect fill, Aspect fit, Scale to fill and so on. The problem with this method is that the background seems to be good for one device, but distorted for all other devices.
I searched all over the web to find something but without success. Is someone already had this issue and found a solution ?
Thanks a lot in advance !
All you have to do is in viewDidLoad determine the screen size and set a different image; you might want to do the same if your screen is being rotated.
I think you need to use Mode property of UIView,
If you Aspect fill then your image will be set and cropped as per size, but on use of Aspect fill you need to use clipToBound to YES as well,
If you use Aspect fit then image will be display as its Aspect Ratio.
But for background the Aspect fill will be the best with clipToBound to YES
if you want to set the same background image for every viewcontroller you can try this in your appdelegate
[self.window setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:#"default"]]]; and set background color of your viewcontroller to clearColor,thats it. I have done the same thing in one of my application. Feel free to ask further suggestions...

Resizing picker in Titanium Studio (Iphone)

I am new to mobile development with Titanium Studio. I want to create a picker with a little smaller size. I tried setting the Height and Width property but of no use. And I came across below link:
Changing the height of the picker
But I saw that it scales the whole picker including the content in it. I want to reduce the size of the picker without reducing the size of its content. And any idea to customize the picker like changing the background color would be more helpful. Thanks in advance.
Do not try to modify the picker. If you do any transforming in the UI controls of Apple, you'll get a rejection from Apple, since this is a Apple Specific UI element, so any egregious resizing of it will violate the Human Interface guidelines. The general rule is to not use scaling transforms with any of the native UI elements, Apple is big on the unified look and feel so many reviewers will rip you for it.
Please refer the following links
IOS Human interface guidelines
setting the height or width of the picker actually set the height or width of the rows/ entries of the picker. similarly it will effect the width of the Colmms of the picker, if you are using the multi picker.
i will suggest that u use a model window and add background color/image then add the picker to thad window. you can apply animation on opening and closing of model window. you can also specify the position of the picker in this way.
hope this will help you to achieve what you are trying

How to stretch an iOS UISlider

I want to use the standard iOS slider in my application, but wanted it to be a bit stretched so it doesn't "disappear" under my finger... neither google or the books informed me about this.. Is is possible? thks!
Set a custom thumb image then, using setThumbImage:forState:

Resources