I want to change the blackberry listfield deafault accent color
Hello
I want to change the accent color of blackberry deafault (blue) of listfield, here is the code sample, code works fine, I want just to customize the color of the focus of the list... Please suggest me...
package Meidcare;
to import java.util.Enumeration;
import java.util.Vector;
Import net.rim.device.api.collection.util.SortedReadableList;
Import net.rim.device.api.system.Bitmap;
Import net.rim.device.api.system.Display;
Import net.rim.device.api.ui.Color;
Import net.rim.device.api.ui.DrawStyle;
Import net.rim.device.api.ui.Graphics;
Import net.rim.device.api.ui.component.KeywordFilterField;
Import net.rim.device.api.ui.component.KeywordProvider;
Import net.rim.device.api.ui.component.ListField;
Import net.rim.device.api.ui.component.ListFieldCallback;
Import net.rim.device.api.ui.container.MainScreen;
Import net.rim.device.api.ui.decor.BackgroundFactory;
Import net.rim.device.api.util.Comparator;
Import net.rim.device.api.util.StringUtilities;
class SearchFieldDemoScreen extends screen
{
Vector drugs_list = new Vector();
Image bitmap buttonleft, buttonright;
CountryList _countryList;
KeywordFilterField _keywordFilterField;
int mHColor = - 1;
public SearchFieldDemoScreen (vector drugs_list) {}
This.drugs_list = drugs_list;
this.getMainManager () .setBackground (BackgroundFactory.createSolidBackground (0xC2C2C2));
buttonLeft = bitmap.getBitmapResource ("medical_pills.png");
buttonRight = bitmap.getBitmapResource ("white_aero.png");
_countryList = new CountryList();
_keywordFilterField = new KeywordFilterField();
Enumeration XmlDiffOperation = drugs_list.elements ();
While (enumumeration.hasMoreElements ()) {}
_countryList.addElement (new Country (enumumeration.nextElement (m:System.NET.SocketAddress.ToString (())));
}
try {}
setTitle (_keywordFilterField.getKeywordField ());
_keywordFilterField.setLabel("Find:");
_keywordFilterField.setSourceList (_countryList, new Country.MyProvider ());
_keywordFilterField.setCallback (new MyListFieldCallback());
_keywordFilterField.SetFocus ();
Add (_keywordFilterField);
}
catch (Exception e) {}
System.out.println ("Exception in keyword filter field =" + e);
}
}
class MyListFieldCallback implements {ListFieldCallback}
{public drawListRow Sub (ListField listField, Graphics g, int index, int y, int width)}
Object obj = ((KeywordFilterField) listField) .getElementAt (index);
g.setColor (Color.BLACK);
If (obj! = null & obj instanceof country) {}
Point country = (country) obj;
g.drawText (item.toString (), 20, y, DrawStyle.ELLIPSIS |) DrawStyle.HCENTER);
g.drawLine (0, y-9, width, y-9);
g.setColor (Color.WHITE);
g.fillRect (0, y-9, width, 3); for 3-pixel thick seprater "line".
g.setColor (Color.BLACK);
} else if(index == 0) {}
g.drawText ("* void *", 0, y);
}
}
protected void drawFocus (Graphics graphics, boolean on) {}
graphics.setColor (Color.RED);
Paint (Graphics);
}
public Object get (ListField list, int index) {}
Return drugs_list.elementAt (index);
}
public int getPreferredWidth (ListField list) {}
Return Display.getWidth ();
}
public int indexOfList (String prefix, int start, ListField list) {}
return 0;
}
}
class CountryList extends SortedReadableList
{
Vector drugs_list = new Vector();
public CountryList()
{
Super (new Country.CountryListComparator ());
}
Sub addElement (Object item)
{
try {}
System.out.println ("Ankur");
SearchFieldDemoScreen.ls2 = new ListStyleButtonSet();
((Field)) SearchFieldDemoScreen.ls2.add element;
doAdd (element);
}
catch (Exception e) {}
System.out.println ("Exception in Add item =" + e);
}
}
}
}
class country
{
private String _countryName;
public country (String countryName)
{
_countryName = countryName;
}
public String ToString)
{
Return _countryName;
}
public static class MyProvider implements {KeywordProvider}
public String [] getKeywords (Object obj) {}
Point country = (country) obj;
return new String [] {item._countryName};
System.out.println ("called MyProvider");
Return StringUtilities.stringToWords (obj.toString ());
}
}
public static class CountryListComparator implements comparator
{
public int compare (Object o1, object o2)
{
System.out.println ("CountryListComparator called in method compares");
If (o1 == null | o2 == null)
throw new IllegalArgumentException ("can't compare countries null");
Return o1.toString () .compareTo (o2.toString ());
}
}
}
Thanks in advance...
Oky I solved the problem...
using the...
{if (g.isDrawingStyleSet (Graphics.DRAWSTYLE_FOCUS))}
change the accent color
g.setBackgroundColor (0xDCDCDC);
g.Clear ();
draw text
g.setFont (Resize.getSecondFont ());
g.setColor (Color.BLACK);
g.drawText (item.toString (), 20, y, DrawStyle.ELLIPSIS |) DrawStyle.HCENTER);
}
inside the drawListRow...
Thank you all...
----------------------------------------------
Press on as if you like it...
Tags: BlackBerry Developers
Similar Questions
-
I want to change the secret question. Can someone help me? TQVM
I want to change the secret question. Can someone help me? TQVM
Security issues Apple - ID
Account security issues almost always require directly contact a representative from Apple to firmly establish your identity as the account holder. You can configure so that Apple you call, either immediately or at a time convenient to you.
1. go to http://www.apple.com/support/appleid/
2 choose to contact Support, then click on contact Support
3. choose other subjects of Apple ID and choose the appropriate topic for your question (questions of security or password)
4. choose, no thanks, continue
5. choose the best method for you to contact Apple
By the end of 2012 Mac minis, macOS? Watch, 38 mm silver AL, Watch BONES 2.2.2; iPad 2 Air & iPhone 6 + iOS? Apple Airport Express
-
I want to change the account for new messages
I have 12 mailaccounts. I want to change the standard account. It seems to me that the first account in the list is the standard account for new mail, I want the second in the list.
Tools / account settings
Button down "Actions account."
as a default value -
I want to change the background, but I don't seem to see how.
I spent the worst part of the past 3 or 4 hours to try to change the background and add a widget or two. I can't find a way to do it. Please don't tell me that Firefox is lame that I can't do this.
So, you want to change the home page.
See - How to set the home pageOr maybe you want the page tab as your homepage?
Open on: newtab and set it as your home page by using the information in the article above to support. -
I want to change the layout of my e-mail messages so that the message is on the side of the headers not below them. I just downloaded mozilla thunderbird on my new laptop computer to I can not get the layout that I'd rather go back. Help, please. Thanks June
Maybe try Vertical page layout view in the menu bar.
No menu bar? Press the ALT key.
-
I want to change the name that appears under 'To' and the 'author '.
I want to change the name that appears under 'To' and the 'author '.
No matter what particular place, or simply everywhere where you happen to be at this time?
-
(1) I want to change the default extensions.ietab.filterlist to mywebsite url value without having to follow several steps, each time that the user is going to hit my site, then to the users of the browser extensions.ietab.filterlist value must be added when it will hit my site. Topic: config, we can add manually, but I don't want to manually add, is it possible to automate this process.
(2) is it possible to install the activex (extension Ietab) without clicking on add to firefox, I ask because my site is not supported in firefox because of the activex.(3) how to add admin privileges for activex in firefox.
. Please help meI found the solution to this problem,
(1) I added the User.js file in the default mozilla profile folder IE
C:\Users\xpointers\AppData\Roaming\Mozilla\Firefox\Profiles\xb2fxdxi.default, I've added in user.js
user_pref ("extensions.ietab2.filterlist", ' / ^ file:\\/\\/\\/.*\\. ") (mht) | ("mhtml) $/ http://*update.microsoft.com/* http://www.windowsupdate.com/ * http://www.UrWebsiteUrl.com/ * ");You can add n number of URLs to run in IETAb or IEtab2.
User.js file overwrites the prefs.js file.(2) allowing to automatically add extensions to add addon, using the code and need to change the extensions.json file to the new version of firefox, for the old version of firefox need to change in the sqlite database.
-
Mac Snow Leopard
24.5.0 TBSuggestions made to me in order to find the prefs.js file, but I can't (library/mozilla, library/application support/mozilla not here, nor in the search feature)
Tried with display of cookies too.
Really a pain I need more active accounts on open top but not enough space with less active accounts, stuck in the middle.
No STREAM not RSS, local folders on bottom OK.
Just want to change the order, but can't seem to find the solution.
Free smile to one that helps me! Thank you
Use this module.
https://addons.Mozilla.org/en-us/Thunderbird/addon/manually-sort-folders/
-
I just want to change the color of the button but it there as many files of code so much, and I can't find a page that will tell me it please help
You can change the color by using the App button color- https://addons.mozilla.org/firefox/addon/app-button-color/ module
-
I want to change the country of the Canada in the United States, so I can use an American gift card. ITunes doesn't let me do it because I still have 35 cents left on my account of the Canada. How can I remove le.35 so that I can spend the country?
You are currently in the United States and have a billing address in the United States? You cannot use the US store if you're not there. If you are in the United States communicating try with iTunes support and ask them to withdraw the balance of your account: https://www.apple.com/emea/support/itunes/contact.html
-
Satellite Pro A100 SCOCAPS: I want to change the command for real player buttons
I have A 100 SCOCAPS, I want to change the media controls to real player instead of windows media player, but in media control list only windows MediaPlayer is appearing... all about can help me please?
Hello
I'm not 100% sure but I think that all media buttons are designed to support Microsoft WMP only. Maybe if you use real player plugins so that they work.
I found some similar topic, but the guy wanted to use the buttons for WinAmp. If you have time please check under http://forums.computers.toshiba-europe.com/forums/thread.jspa?forumID=3&threadID=14884
If you are success please give some feedback. It can be useful information.
Bye and good luck!
-
Tecra A8: Want to change the shape of U.S. keyboard in the United Kingdom
I have a Tecra A8, bought in the United States, and I want to change the keyboard of the UK type. I need to know the part number and where I can order this.
Hello
All parts and devices, you can order form the Toshiba service partner in your country.
On this Toshiba support page you will find the link to the database of access points worldwide:
_eu http://eu.Computers.Toshiba-Europe.com/cgi-bin/ToshibaCSG/generic_content.jsp?service=eu&ID=Support_Homepage -
Qosmio G20: I want to change the operating system, but cannot do
Qosmio G20: I want to change the operating system, but I can't do it.
Please help me and I will be grateful
Hello
Of course, you can change the operating system and install another I wonder what OS you prefer? :|
I think that you can not install the new OS because the HARD drive is not visible. Am I wrong?
Fact is that the G20 series supports RAID functionality. You must install the RAID driver before you continue the OS installation procedureThe RAID driver can be downloaded from the European pilot of Toshiba page and should be included in the operating system using an external USB FDD drive.
Greetings
-
Satellite A210-128: I want to change the 320 GB HARD drive 7200 RPM
Hallo all
Can someoane help me with this little problem?
I have a portable satellite A210-128 with a hard drive of 250 G 4200 RPM (* slowest *)... I want to change the hard drive with a hdd 2.5 "Western Digital 320 G 7200 RPM (* speed *).Question:
1. If I buy a disk sata2 hard can I put on my laptop because my A210-128 has a disk sata hard?2 can I I install vista on this new hard drive on my vista dvd, im asking this because I want to be shor that my recovery dvd * RECOGNIZES THE NEW HARD drive * and I can install a new copy of windows or installing dvd can * only works with disk drives hard toshiba *... ???
Thank you.
As to the question;
(1) I think a SATA2 HARD drive would go because the standard SATA2 is compatible to the bottom. But I assume that the system will operate as a good HDD SATA.
(2) Yes, you can install vista using the Toshiba Recovery DVD. It shouldn't be a problem with a fresh install
Good bye
-
I want to change the password I use to access MS Answers. How to do his?
I want to change the password I use to access MS Answers. How to do his?
Hello
1. How are you to access MS Answers site? Is it through Windows Live ID, Hotmail?
2. what version of Windows operating system is installed on the computer?
You can check the following items and check if it helps to solve the problem.
How can I change my password?: http://Windows.Microsoft.com/en-us/Messenger/change-password-FAQ
Reset your password: https://account.live.com/ResetPassword.aspx
Maybe you are looking for
-
Problem face Time and sky Hub... Help!
Hi, we have a Hub of Sky - SR102-Z for our connection broadband. Speeds are great, without connection problems with the exception of FaceTime on iPhone, iPad and iMac too. Our connection speeds are- Upstream (Kbps) 5676 Downstream (kbit/s) 30816 We a
-
Satellite A300-1N8 on XP in AHCI - "iaStor" error and gel
Hello guys,. A friend of mine bought a new A300-1N8 Toshiba without BONE a month ago. I installed Win XP Pro Sp3 and after 2 days of wondering how to activate DCIS (because in compability mode it was hellish slow), I found out how do and I've done my
-
T60 taken under warranty?
My take on my t60 is upward. The laptop will beep as if someone pulled the plug power on and off while I'm typing. It has never been dropped and has a 3 year warranty this would be covered? Thanks for any input.
-
Windows hotmail updates its accounts
I got a junk mail saying hotmail updates its accounts and need my email address/password / name and territory otherwise in 2 weeks, that my account will be closed is - it true or a scam?
-
Problems with KB2518864, KB2572073, KB2633880
I, also, courses in problems of installation with KB2518864, KB2572073, KB2633880 security updates. When it happened the first time, I thought that I had committed a security breach due to a user "guest" on my computer, so I used system restore to re