1

Recently while doing a little project of mine, I applied View.GONE in my code and from time to time like randomly I will receive this error below.

05-15 15:08:06.426 26589-26589/com.jobforhire.mobile W/View: requestLayout() improperly called by android.widget.LinearLayout{e203993 V.E...... ......I. 0,0-0,0 #7f0e00cf app:id/card_location_container} during layout: running second layout pass
05-15 15:08:06.426 26589-26589/com.jobforhire.mobile W/View: requestLayout() improperly called by android.widget.LinearLayout{ff57dd0 V.E...... ......I. 0,0-0,0 #7f0e00d2 app:id/card_jobtype_container} during layout: running second layout pass
05-15 15:08:06.426 26589-26589/com.jobforhire.mobile W/View: requestLayout() improperly called by android.widget.LinearLayout{6bc21c9 V.E...... ......I. 0,0-0,0 #7f0e00cf app:id/card_location_container} during layout: running second layout pass
05-15 15:08:06.426 26589-26589/com.jobforhire.mobile W/View: requestLayout() improperly called by android.widget.LinearLayout{adbd0ce V.E...... ......I. 0,0-0,0 #7f0e00d2 app:id/card_jobtype_container} during layout: running second layout pass
05-15 15:08:06.426 26589-26589/com.jobforhire.mobile W/View: requestLayout() improperly called by android.widget.LinearLayout{68adbef V.E...... ......I. 0,0-0,0 #7f0e00cf app:id/card_location_container} during layout: running second layout pass
05-15 15:08:06.426 26589-26589/com.jobforhire.mobile W/View: requestLayout() improperly called by android.widget.LinearLayout{1fca6fc V.E...... ......I. 0,0-0,0 #7f0e00d2 app:id/card_jobtype_container} during layout: running second layout pass

And I read a couple of post here and there that by using View.GONEwill randomly cause the above error. Is there anyway proper way to use View.GONE ? Is it better to set View.GONE to an individual object like or encase the object in a layout and apply View.GONE to the layout ?

Community
  • 1
  • 1
azriebakri
  • 1,131
  • 2
  • 11
  • 36

0 Answers0