我需要可調焦的水平現場管理器,爲此我在論壇中找到了一些代碼。如何在黑莓中創建可調焦的水平現場管理器
hfm[i]=new HorizontalFieldManager(HorizontalFieldManager.FOCUSABLE)
{
protected void onFocus(int direction)
{
Background bg = BackgroundFactory.createLinearGradientBackground(0x00E2E2E2,0x00E2E2E2,0x00E2E2E2,0x00E2E2E2);
setBackground(bg);
}
protected void onUnfocus()
{
Background bg = BackgroundFactory.createLinearGradientBackground(0x00FFFFFF,0x00FFFFFF,0x00FFFFFF,0x00FFFFFF);
setBackground(bg);
}
};
rtf[i]=new ExtendedLabel(list[i]);
hfm[i].add(rtf[i]);
add(hfm[i]);
但它不可作爲焦點,如果
退房ListStyleButtonField的情況下,這是你在試圖重新創造什麼:http://supportforums.blackberry.com/t5/Java-Development/ Implement-advanced-buttons-fields-and-managers/ta -p/488276 –
感謝您的支持,這是鏈接對學習其他概念也非常有幫助 – Ajay