search

Home  >  Q&A  >  body text

java - Multi-interface function reuse?

There are multiple activities in my application, and each of these activities has the same custom combination control, and the functions called by the combination control are the same, but these functions are dependent on the activity. Is there any way to associate the custom combination control with those functions without writing the same code in every activity? Those functions are in BaseActvity, and other activities inherit BaseActivity.
ps: The location of those functions cannot be changed;

伊谢尔伦伊谢尔伦2747 days ago587

reply all(1)I'll reply

  • 黄舟

    黄舟2017-06-05 11:12:46

    The control instance is used as a parameter to call the BaseActivity method? Or describe the problem in more detail.

    reply
    0
  • Cancelreply