preferences + asyn result calculation

This commit is contained in:
serso
2011-09-13 15:15:21 +04:00
parent f0a7f8180b
commit 43732f1632
5 changed files with 52 additions and 17 deletions

View File

@@ -1,5 +1,7 @@
package org.solovyev.android.view;
import android.os.Handler;
import android.widget.Button;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.solovyev.util.math.Point2d;
@@ -76,6 +78,19 @@ public class DragButton extends ColorButton {
// prevent on click action
setPressed(false);
}
if (v instanceof Button) {
final Button button = (Button)v;
button.setEnabled(false);
new Handler().postDelayed(new Runnable() {
public void run() {
button.setEnabled(true);
}
}, 500);
}
}
startPoint = null;