Segmented control in Android

后端 未结 5 531
终归单人心
终归单人心 2020-12-11 18:24

I need to use IPhone like segmented control in Android. Is there a default control for the same? What might be the best and efficient way to do so?

5条回答
  •  一生所求
    2020-12-11 19:03

    What you are looking for is MaterialButtonToggleGroup, and you can put in some Material Button. It is pretty similar to iOS UISegmentContorol.

    It looks like this:

    source with example: https://material.io/develop/android/components/buttons#toggle-button

提交回复
热议问题