0
我是新手在编程和有问题。
我的代码:
choiceFieldANTYFM = new ObjectChoiceField("Wybierz stację(6)", new String[]{"Warszawa [96kb]"});
choiceFieldANTYFM.setChangeListener(this);
btnSelectantyfm = new ButtonField("Słuchaj!", FIELD_HCENTER | ButtonField.CONSUME_CLICK);
btnSelectantyfm.setChangeListener(this);
stopplaying = new ButtonField("STOP", FIELD_HCENTER | ButtonField.CONSUME_CLICK);
stopplaying.setChangeListener(this);
add(choiceFieldANTYFM);
add(btnSelectantyfm);
add(stopplaying);
等:
public void fieldChanged(Field field, int context) {
if (field == btnSelectantyfm)
{
System.out.println("Selected item: " + Integer.toString(choiceField.getSelectedIndex()));
}if (field == btnSelect)
{
switch (choiceField.getSelectedIndex())
{
case 0:
try {
String url = "http://94.23.220.75:6000;deviceside=false;ConnectionUID=GPMDSEU01";
Player player;
player = javax.microedition.media.Manager.createPlayer(url);
player.start();
}
catch (Exception e) {
Dialog.alert(e.toString());
}
break;
好吧,当我按下播放音乐云的应用程序。
当再次推回来。这是第二个问题:)
我想停止流时推停按钮,即使它是可以改变音量键+和 - :)
JDE 5.0 :)
问候。
非常感谢您对uour响应:)按“停止按钮”时,我有循环问题不停止这是一个beta OTA应用程序:http://goo.gl/EnPXH – kris 2012-03-26 16:33:25