0

Currently trying to bind an aar file.

I've used the following lines to make changes, but to no avail.

<attr path="/api/package[@name='com.shopgun.android.viewpager']/interface[@name='CenteredViewPager.OnPageChangeListener']/method[@name='onPageScrolled']"
      name="argsType">Binding_PageScrolledEventArg</attr>

After Dongzhi comment, I added the line.

<attr path="/api/package[@name='com.shopgun.android.viewpager']/interface[@name='CenteredViewPager.OnPageChangeListener']/method[@name='onPageSelected']/parameter[1]" name="managedName">param1Int</attr>

I'm still facing the same error. The interface is declared inside the class CenteredViewPager enter image description here

enter image description here

Kay
  • 13
  • 1
  • 4
  • According to the code you provided, mapping the interface to the event needs to be added to the corresponding parameter, and the code you mapped creates a new onPageScrolled method. You can refer to this mapping code:https://stackoverflow.com/questions/45543081/the-type-groupexpandedeventargs-already-contains-a-definition-for-p0-xamarin#:~:text=method%5B%40name%3D%27onGroupExpanded%27%5D/parameter%5B1%5D%22%20name%3D%22managedName%22%3EpositionStart – Zack Oct 25 '22 at 08:18
  • @DongzhiWang-MSFT can you please clarify what you mean, I've added the mapping code from the link you shared and I'm still facing the error. – Kay Oct 26 '22 at 10:47
  • Anyone also facing this issue should follow read this documentation https://github.com/xamarin/java.interop/wiki/Duplicate-Events – Kay Oct 26 '22 at 11:51

0 Answers0