LWUIT选项卡的单击事件? [英] LWUIT Tabs click event?
本文介绍了LWUIT选项卡的单击事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经创建了LWUIT标签.我想识别最终用户的标签点击事件,需要放置一些逻辑?如何识别标签的点击事件?
I have created LWUIT Tabs. I want to identify the enduser tab click event and need to place some logic?How to identify tab click Event?
这是我的代码:
topnews = new Vector();
topstory = new Vector();
cinemanews = new Vector();
newsList = new List(topnews);
newsList.setScrollVisible(false);
newsList.setRenderer(new NewsListCellRenderer());
myNewsList = new List(topstory);
myNewsList.setScrollVisible(false);
myNewsList.setRenderer(new NewsListCellRenderer());
cinemaNewsList = new List(cinemanews);
cinemaNewsList.setScrollVisible(false);
cinemaNewsList.setRenderer(new NewsListCellRenderer());
Tabs tabs = new Tabs();
tabs.addTab("Topnews", newsList);
tabs.addTab("TopStory", myNewsList);
tabs.addTab("CinemaNews", cinemaNewsList);
tabs.addTabsFocusListener(new FocusListener() {
public void focusGained(Component cmpnt) {
//how to identify the enduser tab click event here?
}
}
谢谢
推荐答案
似乎没有直接支持,有一个选项可以添加带有RadioButton的选项卡并将侦听器绑定到按钮,但是看起来很糟糕滑动选项卡组件支撑的位置(将触摸设备中的选项卡拖动到侧面).
This doesn't seem to be directly supported, there is an option to add a tab with a RadioButton and bind a listener to a button but it would look badly in case of swiping which the tabs component support (dragging the tab in a touch device to the side).
这篇关于LWUIT选项卡的单击事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文