Expander for Xamarin.Android

Nathan Sokalski 4,116 Reputation points
2021-03-03T03:51:52.653+00:00

I am focusing on writing my apps directly in Xamarin.Android rather than Xamarin.Forms (Android is my only planned target, and I have found that most of the stuff I did in Xamarin.Forms required large amounts of almost complete rewrites for native anyway), and am looking for a way to do something similar to what the Expander from the Xamarin Community Toolkit did. Because I am very new to Xamarin.Android (actually, I am new to Xamarin overall, all my history is in UWP), I was wondering if anybody had any suggestions on what might be a good way to create a control similar to the Expander (or if there is an existing control that is relatively similar, where to find it). Thank you to anybody who can help me get started.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,289 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JessieZhang-MSFT 7,701 Reputation points Microsoft Vendor
    2021-03-03T09:22:41.027+00:00

    Hello,

    Welcome to our Microsoft Q&A platform!

    In xamarin android, there are two similar views which are the ExpandedMenuView and Expandable ListView .

    For ExpandedMenuView, you can check the tutorial Xamarin Android Tutorial - Expandable Menu .

    For Expandable ListView , you can check Xamarin Android Tutorial - Expandable ListView

    If you really want this functionality, you can just use Expander in xamarin forms, which could run both on android and ios platforms.

    Hope it can help you.

    Best Regards,

    Jessie Zhang

    ---
    If the response is helpful, please click "Accept Answer" and upvote it.

    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.