We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java.Lang.NullPointerException: Attempt to invoke interface method 'int java.lang.CharSequence.length()' on a null object reference
Implementation
public SuperRabbit.Lib.WheelPicker pickerViewModel; pickerViewModel = new SuperRabbit.Lib.WheelPicker(Droid.MainActivity._Instance); List<object> listDigits = new List<object> { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }; pickerViewModel.SetAdapter(new CustomWheelAdapter(listDigits)); StackLayout stack = new StackLayout(); stack.Children.Add(pickerViewModel); grid.Children.Add(stack, 0, 0); Content = grid;
WheelAdapter class
public class CustomWheelAdapter : Java.Lang.Object, Android.Support.V7.View.ActionMode.ICallback, SuperRabbit.Lib.IWheelAdapter { public CustomWheelAdapter(List<object> list) { ListItems = list; } public List<object> ListItems { get; set; } public int MaxIndex { get; set; } public int MinIndex { get; set; } public string TextWithMaximumLength { get; set; } public int GetPosition(string value) { return 0; } public string GetValue(int position) { return string.Empty; //Console.WriteLine("GetValue(); pos:" + position); //if (ListItems != null && ListItems.Count >= position) // return ListItems.ElementAt(position).ToString(); //else // return string.Empty; } bool Android.Support.V7.View.ActionMode.ICallback.OnActionItemClicked(Android.Support.V7.View.ActionMode mode, IMenuItem item) { throw new NotImplementedException(); } bool Android.Support.V7.View.ActionMode.ICallback.OnCreateActionMode(Android.Support.V7.View.ActionMode mode, IMenu menu) { throw new NotImplementedException(); } void Android.Support.V7.View.ActionMode.ICallback.OnDestroyActionMode(Android.Support.V7.View.ActionMode mode) { throw new NotImplementedException(); } bool Android.Support.V7.View.ActionMode.ICallback.OnPrepareActionMode(Android.Support.V7.View.ActionMode mode, IMenu menu) { throw new NotImplementedException(); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Java.Lang.NullPointerException: Attempt to invoke interface method 'int java.lang.CharSequence.length()' on a null object reference
Implementation
WheelAdapter class
The text was updated successfully, but these errors were encountered: