@@ -15,23 +15,23 @@ namespace Xamarin.Forms.Controls.Issues
15
15
#if UITEST
16
16
[ Category ( UITestCategories . CarouselView ) ]
17
17
#endif
18
- [ Preserve ( AllMembers = true ) ]
19
- [ Issue ( IssueTracker . Github , 13616 ,
20
- "[Bug] After updating XF 5.0.0.1931 getting Java.Lang.IllegalArgumentException: Invalid target position at Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod" ,
18
+ [ Preserve ( AllMembers = true ) ]
19
+ [ Issue ( IssueTracker . Github , 13616 ,
20
+ "[Bug] After updating XF 5.0.0.1931 getting Java.Lang.IllegalArgumentException: Invalid target position at Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod" ,
21
21
PlatformAffected . Android ) ]
22
22
public partial class Issue13616 : TestContentPage
23
23
{
24
24
public Issue13616 ( )
25
25
{
26
26
#if APP
27
27
InitializeComponent ( ) ;
28
- BindingContext = new Issue13616ViewModel ( ) ;
28
+ BindingContext = new Issue13616ViewModel ( ) ;
29
29
#endif
30
- }
30
+ }
31
31
32
- protected override void Init ( )
32
+ protected override void Init ( )
33
33
{
34
- }
34
+ }
35
35
36
36
#if UITEST && __ANDROID__
37
37
[ Test ]
@@ -42,74 +42,74 @@ public void Issue13616Test()
42
42
RunningApp . WaitForElement ( "CarouselViewId" ) ;
43
43
}
44
44
#endif
45
- }
45
+ }
46
46
47
- [ Preserve ( AllMembers = true ) ]
48
- public class Issue13616Model
49
- {
50
- public string Name { get ; set ; }
51
- public string Desc { get ; set ; }
52
- public Color Color { get ; set ; }
53
- public double Scale { get ; set ; }
54
- }
47
+ [ Preserve ( AllMembers = true ) ]
48
+ public class Issue13616Model
49
+ {
50
+ public string Name { get ; set ; }
51
+ public string Desc { get ; set ; }
52
+ public Color Color { get ; set ; }
53
+ public double Scale { get ; set ; }
54
+ }
55
55
56
- [ Preserve ( AllMembers = true ) ]
57
- public class Issue13616ViewModel : BindableObject
58
- {
59
- int _i = 4 ;
60
- ObservableCollection < Issue13616Model > _myList { get ; set ; } = new ObservableCollection < Issue13616Model > ( ) ;
56
+ [ Preserve ( AllMembers = true ) ]
57
+ public class Issue13616ViewModel : BindableObject
58
+ {
59
+ int _i = 4 ;
60
+ ObservableCollection < Issue13616Model > _myList { get ; set ; } = new ObservableCollection < Issue13616Model > ( ) ;
61
61
62
- public Issue13616ViewModel ( )
63
- {
64
- Items = new ObservableCollection < Issue13616Model >
65
- {
66
- new Issue13616Model
67
- {
68
- Name = "Card 1" ,
69
- Desc = "Card Holder Name 1" ,
70
- Color = Color . Yellow
71
- } ,
72
- new Issue13616Model
73
- {
74
- Name = "Card 2" ,
75
- Desc = "Card Holder Name 2" ,
76
- Color = Color . Orange
77
- } ,
78
- new Issue13616Model
79
- {
80
- Name = "Card 3" ,
81
- Desc = "Card Holder Name 3" ,
82
- Color = Color . Red
83
- }
84
- } ;
85
- }
62
+ public Issue13616ViewModel ( )
63
+ {
64
+ Items = new ObservableCollection < Issue13616Model >
65
+ {
66
+ new Issue13616Model
67
+ {
68
+ Name = "Card 1" ,
69
+ Desc = "Card Holder Name 1" ,
70
+ Color = Color . Yellow
71
+ } ,
72
+ new Issue13616Model
73
+ {
74
+ Name = "Card 2" ,
75
+ Desc = "Card Holder Name 2" ,
76
+ Color = Color . Orange
77
+ } ,
78
+ new Issue13616Model
79
+ {
80
+ Name = "Card 3" ,
81
+ Desc = "Card Holder Name 3" ,
82
+ Color = Color . Red
83
+ }
84
+ } ;
85
+ }
86
86
87
- public ObservableCollection < Issue13616Model > Items
88
- {
89
- get
90
- {
91
- return _myList ;
92
- }
93
- set
94
- {
95
- _myList = value ;
96
- OnPropertyChanged ( nameof ( Items ) ) ;
97
- }
98
- }
87
+ public ObservableCollection < Issue13616Model > Items
88
+ {
89
+ get
90
+ {
91
+ return _myList ;
92
+ }
93
+ set
94
+ {
95
+ _myList = value ;
96
+ OnPropertyChanged ( nameof ( Items ) ) ;
97
+ }
98
+ }
99
99
100
- public ICommand AddCardCommand { get { return new Command ( AddCard ) ; } }
100
+ public ICommand AddCardCommand { get { return new Command ( AddCard ) ; } }
101
101
102
- void AddCard ( )
103
- {
104
- var tempList = Items . ToList ( ) ;
105
- tempList . Add ( new Issue13616Model
106
- {
107
- Name = "Card " + _i ,
108
- Desc = "Card Holder Name " + _i ,
109
- Color = Color . Blue
110
- } ) ;
111
- Items = new ObservableCollection < Issue13616Model > ( tempList ) ;
112
- _i ++ ;
113
- }
114
- }
102
+ void AddCard ( )
103
+ {
104
+ var tempList = Items . ToList ( ) ;
105
+ tempList . Add ( new Issue13616Model
106
+ {
107
+ Name = "Card " + _i ,
108
+ Desc = "Card Holder Name " + _i ,
109
+ Color = Color . Blue
110
+ } ) ;
111
+ Items = new ObservableCollection < Issue13616Model > ( tempList ) ;
112
+ _i ++ ;
113
+ }
114
+ }
115
115
}
0 commit comments