How to make rotating menu

前端 未结 4 1387
情歌与酒
情歌与酒 2020-12-08 11:51

I have a question about rotating menu in android. I would like to make animated menu moving like gun cylinder.

<script

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-08 12:32

    Create your own layout extending ViewGroup and override OnMeasure and OnLayout methods. There you can position your buttons yourself. Listen for touch events in your custom layout and process this information in mentioned methods.

    Have a look at FlowLayout implementation. It isn't what you are looking for, however it should get you started to understand what you actually need to do OnLayout and OnMeasure.

    Good luck.

提交回复
热议问题