I have encountered several issues while extending ListView widget. According to the sources, we have the following inheritance chain:
CustomListView<-ListView<-AbsListView<-ViewGroup... I'm trying to override layoutChildren() method and here comes the first issue. After calling super.layoutChildren() program execution comes to the point, where obtainView() method of the AbsListView.java<http://grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/2.3.7_r1/android/widget/AbsListView.java/?v=source>abstract class should be called from ListView.java<http://grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/4.0.3_r1/android/widget/ListView.java/?v=source>class. obtainView() method has default access modifier, as a result, I should not have an ability to override it in my CustomListView class, since AbsListViewbelongs to the different package. But, if I place obtainView() method in CustomListView class, it works! So my first question is, why does this happen? The second question is very similar to the first one. We have two methods (attachViewToParent() and addViewInLayout()) in the ViewGroup class. Both of them have protected access modifier, thus, it is possible to override them. But if I place this methods in CustomListViewclass, this doesn't work for me. So the question is, why? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

