iv_sound.setOnClickListener(new OnClickListener() {
boolean flagDoubleClick=false;
@Override
public void onClick(View v) {
if (!flagDoubleClick) {
Toast.makeText(ChatActivity.this,"第1点击",Toast.LENGTH_SHORT).show();
flagDoubleClick = true;
}else {
Toast.makeText(ChatActivity.this,"第2点击",Toast.LENGTH_SHORT).show();
flagDoubleClick = false;
}
}
});
Button模拟开关按钮
最新推荐文章于 2023-11-23 17:22:15 发布