A
A
Anton @ Lyalin2017-07-02 11:38:12
Android
Anton @ Lyalin, 2017-07-02 11:38:12

How to assign a method to a button from another class?

Is it possible to give a button a method from another class in the xml. For example,
android:onclick="OtherClass.click"
I want to describe all the methods in another class so that there is less garbage in the MainActivity class.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question