Multiple strings in LabelField or RichTextField in blackberry - blackberry

I want to add multiple strings in the LabelField or RichTextField in my application. So that i'm able to control the font size of both the strings and also i'm able to click on this row to navigate.
eg.
Title
date

You can use RichTextField to have multiple strings with multiple fonts. Check the RichTextField class in the APIs
http://www.blackberry.com/developers/docs/3.7api/net/rim/device/api/ui/component/RichTextField.html

Related

Custom bulleted text in UITextView

I need square bulleted(colored) text as follows
◼︎ Some large amount of text that
make it span to the next line.
to be shown in UITextView. But the problem is it doesn't git the padding on the next line.
◼︎ Some large amount of text that
make it span to the next line.
These bulleted text is of static content and hence no need to set it through code.
Also custom font is not working when I set attributed type. Custom font used is Raleway.
You need to set up a ruler with a "hanging indent." I have no idea how to do this manually with text attributes.
I would suggest instead setting up what you want in a .rtf file and then loading an attributed string from the RTF using either initWithURL:options:documentAttributes:error: (which is only available in iOS 9 or later) or initWithData:options:documentAttributes:error: (which is available in iOS >= 7.0.)
You specify an options dictionary of
Objective-C:
#{NSDocumentTypeDocumentAttribute:NSRTFTextDocumentType}
Swift:
[NSDocumentTypeDocumentAttribute:NSRTFTextDocumentType]

How do you add uneditable text in an iOS app

I now a label can create static text, but I have a few paragraphs that are neatly formatted that need to go to my app. How can I do this without using a label?
You can use a UITextView and set the editable property to NO

moving on text of labelfield in blackberry

i have large data in label field and using FOCUSABLE on it makes the whole data selected at once.Scrolling down focus goes to next LabelField.Is ther a way to move on text of LabelField line by line
Eg: my label field is
String tenlines="line
line 2...
line10"
LabelField f= new LabelField(tenlines);
You can use RichTextField
String tenlines="line
line 2...
line10";
RichTextField detailField = new RichTextField(tenlines)

Custom List in blackberry?

How to create Custom Listfield in blackberry like android.
image some Text1
some Text2
one image and its right side some text and below it also a text.
Custom ListField row with images and text this clearly says how to do this ...

BlackBerry API 6.0. How to make a LabelField wider (to make it stop enforcing new lines)?

I have a class which extends LabelField to set font and color.
I have 2 such custom LabelFields and they display some strings of text. Those Strings are rather short, about a dozen symbols long.
The problem is that these custom LabelFields enforce new lines. They break my strings and display them in 2 lines instead of only 1 (no matter if a String is 6 or 12 characters long).
How to make these LabelFields stop enforcing new lines?
I need to have one line stay one line.
Update:
I have found the reason of that problem.
The problem was on another level, - in the process of calculation of width and height for my popup Screen which contained those LabelFields.
you can use the style LabelField.ELLIPSIS to force the single line.
like
LabelField l = new LabelField("your text",LabelField.ELLIPSIS);

Resources