avoid concurrent button press crash in TimeListEdit
This commit is contained in:
parent
ddb6e1c007
commit
4c25272969
1 changed files with 9 additions and 7 deletions
|
@ -372,11 +372,13 @@ public class TimeListEdit {
|
|||
}
|
||||
|
||||
private void addItem(int index, int timeAsSeconds, double value1, double value2) {
|
||||
synchronized (this) {
|
||||
if (itemsCount() > inflatedUntil) {
|
||||
layout.removeView(finalAdd);
|
||||
inflateRow(++inflatedUntil);
|
||||
layout.addView(finalAdd);
|
||||
}
|
||||
}
|
||||
try {
|
||||
// shift data
|
||||
for (int i = data1.length(); i > index; i--) {
|
||||
|
|
Loading…
Reference in a new issue