File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/Xamarin.Android.Tools.AnnotationSupport/Objects Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,20 @@ namespace Xamarin.AndroidTools.AnnotationSupport
77{
88 public class AnnotationData : AnnotationObject
99 {
10+ static readonly string [ ] Prefixes = new [ ] {
11+ "android.support.annotation." ,
12+ "androidx.annotation." ,
13+ } ;
1014 public AnnotationData ( XElement e )
1115 {
1216 var a = e . Attribute ( "name" ) ;
1317 Name = a == null ? null : a . Value ;
14- string predef = "android.support.annotation." ;
15- if ( Name . StartsWith ( predef , StringComparison . Ordinal ) )
18+ foreach ( var predef in Prefixes ) {
19+ if ( ! Name . StartsWith ( predef , StringComparison . Ordinal ) )
20+ continue ;
1621 Name = Name . Substring ( predef . Length ) ;
22+ break ;
23+ }
1724 Values = e . Elements ( "val" ) . Select ( c => new AnnotationValue ( c ) ) . ToArray ( ) ;
1825 }
1926
You can’t perform that action at this time.
0 commit comments