Skip to content

Commit 5d2a80f

Browse files
committed
[Mono.Android] workaround findViewById() isssue.
This workarounds the issue by metadata fixup which is 100x easier than making changes to api-merge (which should be still easier though).
1 parent d80737b commit 5d2a80f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Mono.Android/metadata

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,4 +1357,13 @@
13571357
<attr path="/api/package[@name='android.view']/*[@name='View']/method[@name='getFocusable']" name="enumReturn">Android.Views.ViewFocusability</attr>
13581358
<attr path="/api/package[@name='android.view']/*[@name='View']/method[@name='setFocusable']/parameter[@name='focusable' and @type='int']" name="enumType">Android.Views.ViewFocusability</attr>
13591359

1360+
<!-- API Level 26 changed findViewById() to have a generic type parameter.
1361+
That is technically different in Java sources, but are identical to
1362+
former non-generic version. So they should be regarded as identical.
1363+
Also, for this method we have *manually* bound generic method.
1364+
1365+
We could make fixes in api-merge, but manual fix is 100x simpler. -->
1366+
<remove-node path="/api/package[@name='android.view']/class/method[@name='findViewById']/typeParameters" api-since="26" />
1367+
<attr path="/api/package[@name='android.view']/class/method[@name='findViewById']" name="return" api-since="26">android.view.View</attr>
1368+
13601369
</metadata>

0 commit comments

Comments
 (0)