I am extending ListActivity
in one of my Activities but I need to extend one more Activity
.
So, is there an alternative for extending ListView
in Android?
I am using the ListView
to display the data from database.
First of all: Java does not support multiple inheritance.
After this, what I would to, is to rethink in the design: does it make sense to your class to be ListActivity
and other Activity
?
If yes, there are a couple of workarounds you can try:
Aggregation: make a class that takes those two activities as fields.