05-09-2009 10:04 AM
Hi all, hope this question will also be useful for the readers..
Requirement: I have to put some links in a MainScreen where when user clicks on it, it will go for a web page ..
Currently, I had put some focusable labels.. On its onFocus(), I just underline the text to simulate like hyperlinks .. On its onUnfocus(), I show it again normally!
One doubt here!
Is there a straight way of doing this? That is, does blackberry gives an API to put hyperlinks?
In the method, I prescribed above, I wrote browser invocation on navigationClick() , it works just fine .. But when I come back, I see full menu with a copy option..
How do I prevent this? The same issue with clickable BitmapField also! (Note: Forums didn't answer it anywhere, in my search)
I can ask like this, how can I disable the Full Menu for an application completely - In this scenario, how would you managed to design the application?
Post your views ..
Solved! Go to Solution.
05-09-2009 10:21 AM
You can use ActiveAutoTextEditField this will help you is solving your problem.
05-09-2009 10:30 AM - edited 05-09-2009 10:32 AM
@ Rajat! For my big question, is this the answer? Well, I'm not trying anything .. Just input your views..
Anyway thanks for your input rajat..
Edit: Note - I don't want code suggestions or piece of codes ..
05-09-2009 10:35 AM
Sorry but did not get what you want to tell.
05-09-2009 10:45 AM
Do you want me to explain more
@ Rajat - Is there an option for disabling the Full Menu option for an application completely?
@ Others - please see the thread's start - Hopefully, I'm posting at two of the off days (Sat and Sun ) .. Will bump the thread up, if needed..
05-09-2009 02:13 PM
Using focusable Labels is an interesting approach.
As Rajat has said, another alternative is just to use any of the Active textFields - they automatically handle links (http://...) and will invoke the Browser. You can see these when you display an email text with links in it. The 'down side' of these is that you will have to display the full URL, which might be pretty ugly.
You might also be able to display a BrowserField, in which case you can populate it with html links, but I think your Label approach is easier.
I suspect the reason that you are seeing the Full menu on return from the Browser is either:
a) you do not return true from your navigationClick()
b) you call super,navigationClick()
Since you are completely handling the click, then I would return true and not call super.
Hope this helps.
05-10-2009 05:49 AM
That was it peter!
As you might know I'm using Eclipse with JDE plugin for development, and when I override a method using
Right Click -> Source -> Override/Implement Methods..,
I can select methods needed for overriding, It actually overrides by returning a call to its super class's same method by default .. Then I would write logic for my own needs ..
Yes my overriden method's "return" calls super class's navigationClick (I left it remain Unchanged) .. This is the problem .. Hope BitmapField's navigation click should also return true for preventing full menu ..
I knew of Actve text fields and I'm not supposed to show full length URLs, and thats why I hadn't shown interest to rajat's answer sorry!
And then, BrowserField! The feature I'm going to implement is not that much important and I don't want to make life complicated, I'll use LabelField itself..
Thanks for the clarification peter and thanks for the participation Rajat..