Reputation: 5287
I'm planning to build my own custom layout manager.
If there is any other way to build one apart from extending the View
class, because this is the only approach I know for now and would like to know if there is any other way to do it?
Upvotes: 2
Views: 1249
Reputation: 4098
LinearLayout extends the ViewGroup class http://developer.android.com/reference/android/widget/LinearLayout.html
TableLayout extends LinearLayout http://developer.android.com/reference/android/widget/TableLayout.html
I assume the source of both these classes are available at https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/widget/.
I would have had a look at the classes above and seen if I can extends LinearLayout or if I should extends ViewGroup.
Upvotes: 2