Android - accordion widget

后端 未结 4 1118
北恋
北恋 2020-11-28 07:58

I\'m looking at best way of creating an Accordion-style widget such as on this page. Is there a way of achieving same effect using standard Android toolkit or do I need to

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-28 08:15

    In my app, I used Riya Gayasen's accordion view. It was very easy to get started and worked well. Here is what I did.

    1. Download the zip of source code from https://github.com/riyagayasen/Android_accordion_view.
    2. Unzip and copy 'easyaccordion' folder to your project's root directory (the directory containing the 'app' folder)
    3. In your project root settings.gradle file add :easyaccordion. Here is how my file looks like: include ':app',':easyaccordion'
    4. In your app/build.gradle file add the following line to the dependencies block. implementation 'com.riyagayasen.android:easyaccordion:1.0.3'
    5. And that's it. You can start using the component inside your layout.

提交回复
热议问题