@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
switch(arg0.getId()){
case R.id.bFOR:
try {
dataOutputStream.writeBytes("b");
//dataOutputStream.writeBytes("a");
}catch (UnknownHostException e) {//catch and
outputText(e.getMessage());//display errors
} catch (IOException e) {//catch and
outputText(e.getMessage());//display errors
}
break;
}
}
質問する
47 次
2 に答える
0
setOnLongClickListener を使用してください。
于 2013-07-07T19:36:38.613 に答える
0
setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View arg0) {
switch (arg0.getId()) {
case R.id.bFOR:
try {
dataOutputStream.writeBytes("b");
//dataOutputStream.writeBytes("a");
} catch (UnknownHostException e) {//catch and
outputText(e.getMessage());//display errors
} catch (IOException e) {//catch and
outputText(e.getMessage());//display errors
}
break;
}
}
});
于 2013-07-07T20:04:33.293 に答える