java.lang.StackOverflowError: android.view.View.isLayoutDirectionInherited -


hi getting stackoverflow error while trying add view in layout.

code:

parentofallingmt.addview(layoutinflater.inflate(         r.layout.layout_dstbutton, parentofallingmt, true)); 

here parentofallingmt linear layout , want layout_dstbutton child @ index 1.

prior adding layout_dstbutton, added

parentofallingmt.addview(layoutinflater.inflate(         r.layout.gmt_option_list_dst_on, null, false)); 

which adding properly.

following logcat output:

08-06 07:23:44.843: e/androidruntime(19513): java.lang.stackoverflowerror 08-06 07:23:44.843: e/androidruntime(19513):    @ android.view.view.islayoutdirectioninherited(view.java:11756) 08-06 07:23:44.843: e/androidruntime(19513):    @ android.view.viewgroup.resetresolvedlayoutdirection(viewgroup.java:5379) 08-06 07:23:44.843: e/androidruntime(19513):    @ android.view.viewgroup.resetresolvedlayoutdirection(viewgroup.java:5380) 08-06 07:23:44.843: e/androidruntime(19513):    @ android.view.viewgroup.resetresolvedlayoutdirection(viewgroup.java:5380) 08-06 07:23:44.843: e/androidruntime(19513):    @ android.view.viewgroup.resetresolvedlayoutdirection(viewgroup.java:5380) 08-06 07:23:44.843: e/androidruntime(19513):    @ android.view.viewgroup.resetresolvedlayoutdirection(viewgroup.java:5380) 

the root cause of problem design/approach taking.

i using gmt_option_list_dst_on had 34 relative layout, , within each layout had 5 views. sum , made total of 170 views, reason reason stackoverflow exception.

so choose customize listview instead of inflating multiple(170) views. listview allowed me easy way handle event , performance enhanced too.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -