Android Proguard - how to keep onClick handlers only referenced from XML layouts

前端 未结 3 1648
温柔的废话
温柔的废话 2021-01-11 10:47

In my Android app I ofter don\'t create a View\'s on-click handler in code, but rely on the ability to specify it in the XML layout file, like this:

   

        
3条回答
  •  天命终不由人
    2021-01-11 11:29

    -keepclasseswithmembers class * {
       public void onSearchClicked(android.view.View );
    }
    

    but double check it from proguard doc : http://proguard.sourceforge.net/index.html#/manual/refcard.html

提交回复
热议问题