Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
10-17-2011 03:13 AM
is it possible to write hide and show function using blackberry api in blackberry sample application.if it is possible then please give me sample code.
10-17-2011 06:30 AM
You example is not clear, as I'm not sure if you really want to hide and show the home screen or not.
If this was an application, then the result you see could be achieved by scrolling, so by changing the size of the Manager at the Bottom which is displaying the images. Neither is really show and hide.
In addition to scrolling and resizing, the other way you might implement a show and hide is by adding and removing the Fields.
If this is not enough, can you please give us a more detailed application example. Thanks
10-18-2011 03:05 AM
i have attached the image for hide and show function
when the user click on right arrow icon then it will show the contant. when the user click on down arrow icon then it will hide the content. it will change the icons at the same time. is this possible in blackberry.
if it is possible then pls give me sample code.
10-18-2011 04:47 AM
Yes it is possible.
I think it is unlikely that anyone will give you sample code - the sort of code that handles this sort of stuff will be deep in an applicatin and it wold be difficult and time consuming to extract it out into a standalone form.
The easiest way to d this is to just add the text to the screen when the 'expand' button is clicked, than remove the 'expanded' Field from the screen when the ;shrink' button is clicked - as a result the screen will repaint with or without the text.
An alternative and much more difficult approach wold be to have the Field make itself larger (expand) or smaller (shrink) over a short period and force a relayout of the screen at intervals too. This will will give the illusion of the text 'expanding' or 'shrinking'.
For starters however I recommend that you just add the text to the screen when the button is clicked, then remove it when the 'shrink button is clicked.
I say add and remove to the Screen. You will probably have a number of managers involved here, so I mean add/remove to the parent manager.
10-18-2011 07:02 AM
Sorry I didn't make this clear. You use the same add() for this as you use when you create a Screen or add Fields to a Manager. To delete, you use, as I guess you would probably expect, the delete() method. So no need for code, have a look at the Javadocs.