Hi I have an Interface
and an Activity
.
My Activity implements that Interface and have overrided the method of Interface.
now I have to call that overridden method of Interface from another Class so that overridden method of Activity gets executed.
Thanks in advance...
我可以从其他类中调用Activity的重写方法为
((name of Interface) context).documentRead(dataUnit);
just share the reference of the activity implementing the interface as the object of interface and then simply call the overridden method on that reference . Basic OOP concept.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.