I have used about 4 hours to solve problem, but i can't. I want my ListView item do something in onConfigurationChanged.
I first do follow thing.
android:configChanges="keyboardHidden|orientation|screenSize"
and my Activity implementation onConfigurationChanged, my Fragment also do it.
Finally i implement onConfigurationChanged in my ListView item.All Activity and Fragment will invoke onConfigurationChanged when screen from portrait to landscape, but it won't invoke in ListView item. I custom a ListView and implement dispatchConfigurationChanged, and i find getChildCount will return 1 in dispatchConfigurationChanged. Because my ListView item is 2 and 3, so onConfigurationChanged won't invoke. But how can i solve it? I have search a long time , but i can't solve.
Maybe ask the
Adapterattached to theListView, he knows better ;)The
ListViewhas only one child, aLinearLayout, that's why.