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