A Microsoft framework for building cross-platform mobile apps using .NET and C# with native performance and user interfaces.
Hello,
Welcome to our Microsoft Q&A platform!
Cannot implicitly convert type 'SlotTracker.Machine' to 'Java.Lang.Object'
How do I convert the returned item to Java.Lang.Object?
Please add generics for your BaseAdapter, MachinesAdapter method is like following code.
public class MachinesAdapter : BaseAdapter<Machine>, ISpinnerAdapter
Then you can change the return type to Machine in GetItem, and change the GetItem Method like following code.
public override Machine this[int position] => Machines[position];
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.