@@ -332,22 +332,24 @@ public void resizeViews() {
332
332
if (children > 0 ) {
333
333
for (int iter = 0 ; iter < children ; iter ++) {
334
334
final View v = getChildAt (iter );
335
- final AndroidAsyncView .LayoutParams lp = (AndroidAsyncView .LayoutParams ) v .getLayoutParams ();
336
- if (lp .dirty ) {
337
- lp .dirty = false ;
338
- v .post (new Runnable () {
339
- @ Override
340
- public void run () {
341
- v .requestLayout ();
342
-
343
- Display .getInstance ().getInstance ().callSerially (new Runnable () {
344
- @ Override
345
- public void run () {
346
- Display .getInstance ().getCurrent ().repaint ();
347
- }
348
- });
349
- }
350
- });
335
+ if (v != null ) {
336
+ final AndroidAsyncView .LayoutParams lp = (AndroidAsyncView .LayoutParams ) v .getLayoutParams ();
337
+ if (lp .dirty ) {
338
+ lp .dirty = false ;
339
+ v .post (new Runnable () {
340
+ @ Override
341
+ public void run () {
342
+ v .requestLayout ();
343
+
344
+ Display .getInstance ().getInstance ().callSerially (new Runnable () {
345
+ @ Override
346
+ public void run () {
347
+ Display .getInstance ().getCurrent ().repaint ();
348
+ }
349
+ });
350
+ }
351
+ });
352
+ }
351
353
}
352
354
}
353
355
}
@@ -426,47 +428,6 @@ public void run() {
426
428
}
427
429
428
430
int children = getChildCount ();
429
- if (children > 0 ) {
430
- com .codename1 .ui .Form c = Display .getInstance ().getCurrent ();
431
- for (int iter = 0 ; iter < children ; iter ++) {
432
- final View v = getChildAt (iter );
433
- final AndroidAsyncView .LayoutParams lp = (AndroidAsyncView .LayoutParams ) v .getLayoutParams ();
434
- //if (lp != null && c == lp.pc.getComponentForm()) {
435
- //v.postInvalidate();
436
-
437
- /*if(lp.dirty) {
438
- lp.dirty = false;
439
- v.post(new Runnable() {
440
- @Override
441
- public void run() {
442
- if (v.getVisibility() == View.INVISIBLE) {
443
- v.setVisibility(View.VISIBLE);
444
- }
445
- v.requestLayout();
446
- }
447
- });
448
- } else {
449
- if (v.getVisibility() == View.INVISIBLE) {
450
- v.post(new Runnable() {
451
- @Override
452
- public void run() {
453
- v.setVisibility(View.VISIBLE);
454
- }
455
- });
456
- }
457
- }*/
458
- //} else {
459
- /*if(v.getVisibility() == View.VISIBLE) {
460
- v.post(new Runnable() {
461
- @Override
462
- public void run() {
463
- v.setVisibility(View.INVISIBLE);
464
- }
465
- });
466
- }*/
467
- //}
468
- }
469
- }
470
431
if (rect == null ) {
471
432
postInvalidate ();
472
433
} else {
0 commit comments