height of HorizontalFieldManager - blackberry

How to display chatting data on horizontal field manager., because, i m not sure that how long my text length would be. Like as we do chat in Gmail or facebook.
If is there any other way for displaying the chat data. so please let me know now.

The HorizontalFieldManager will grow in height to whatever the height of the child field is (as long as the space is available).

Related

Adjust UILabel position up based on previous UITextView content?

I want to make an bubble view design more or like WhatsApp design. Please check the attached WhatsApp screenshot,
In screen Time label (1.12 PM and 5.16 PM) adjusts its Y position based on text message content. Its adjustable based on last line content (if the last line is not fully filled, its moves up slightly and it reduces bubble height - looks good).
Is there any solution/suggestion? How to know, Is UITextview content takes fully last line or any other way to achieve this?
Thanks!

iOS - increase UITextField height based on its content

I've a collection view that has on its header some views as user inputs.
In one of them I've something like a Biography textField, but when I'm typing the text continues all the way to the left, and what I'm trying to achieve is that when the text reaches the visible end, it goes to a new like and so it increases its own height.
How can I achieve this?
I want the Bio text field to increase its height based on its text and not stay the same height and the text goes all the way long to the left.
Regards ;)
UITextField is one-line only element. You can try UITextView instead
EDITED
I've never done this, but this thread seems to do something like dynamic size with UITextView

Dynamic height and view more capability for objective C

I am trying to display facebook feed from a json object on a uitable view. I am using a uitextview for displaying the text. How can i add the view more/Continue Reading capability which is common on the facebook app for larger text as shown in the picture below
Check out
- boundingRectWithSize:options:attributes:context: (reference) as a way to get the size of the text you want to display. If the bounding rect is larger than the amount of space you have available you'll know you need to display your 'continue reading' button. Tapping the button could cause the cell to redraw with a larger height, based on the size of the bounding rect you calculated.

iOS - how to handle a case when there is a long text area in an app screen?

I am having a usability issue where in an app screen, there may be too much text and I have nowhere to put that text.
I am attaching a screen shot of my screen. You see how the text on top has more text, but there is no room to put that text. So the text just ends in ....
What is the common way people handle this kind of a situation?
Thanks!
Redesign your UI so you have more room for that text. Maybe your content will need to scroll. You will need to change that label so that the max number of lines is greater (or 0 for unlimited), and make the frame larger to accomodate more lines. You can also reduce the font size a little to decrease how much extra space you'll need to give it.
If you really wanted to, you could use a UITextView for that text, which allows the text to scroll easily (it's a UIScrollView subclass). Then you could just scroll that text, though it wouldn't be very good UI and you would still want it to be more than one line, because scrolling when only one line is visible at a time would make it hard to read.

Adding vertical scrollbar to screen in blackberry application

hi I am new to blackberry development..
I am trying to add a vertical scroll bar on the screen, but not able to do that. because I do not know the way.
VerticalScrollManger scroll = new VerticalScrollManager(Manager.VERTICAL_SCROLL);
please give me the solution.
thanks
Things that extends net.rim.device.api.ui.Manager (like a VerticalFieldManager) can have style bits set in the constructor that specify which type(s) of scrolling you want and whether or not the scrollbars (arrows) should be displayed. Put your Field into a manager that has scrolling enabled and set the manager for the screen You need to set the manager containing the component/field that is too large for the screen to have scrolling enabled AND scrollbars drawn to see scroll arrows.
The style bits you want to set are: Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR
If your UI is built on top of the blackberry classes MainScreen or FullScreen, you can use the constructor taking an argument of type long to set the style bits: MainScreen(long style) could be called as MainScreen(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR); to set the style bits for the screen to include scrolling and vertical scroll indicator arrows.
There is an occasional issue that FieldManagers that are fixed size will sometimes not show scroll arrows (but they'll still scroll). See Blackberry VerticalFieldManager with fixed size : Scroll issue if you are concerned about that issue.
If by scrollbars you mean the small blue arrows, then you can get these to display using the method Jessica described above (set style bits VERTICAL_SCROLL and VERTICAL_SCROLLBAR). However, if by scrollbars you are referring to actual bars that indicate the scrolled position (as seen in the Browser app) then you would need to draw these on the manager yourself, as the BlackBerry API doesn't provide you with any way to display them automatically.
To do something like that you'd need to subclass VerticalFieldManager and override the paint method. Use a combination of the screen height (Display.getHeight()), the manager height (getVirtualHeight()) and the scroll position (getVerticalScroll()) to calculate the Y position and height of the bar, and then draw it on the screen using g.drawRect() or something similar.
If you want a fancier-looking scrollbar, take a look at my article in BlackBerry knowledge base:
http://supportforums.blackberry.com/t5/Java-Development/Implementing-a-standard-style-scrollbar-on-a-Blackberry-device/ta-p/504416

Resources