android 实现圆形菜单
代码说明:
private void computeCoordinates() { BigStone stone; BigStone menus; for (int index = 0; index < STONE_COUNT; index ) { stone = mStones[index]; stone.x = mPointX (float) (mRadius * Math.cos(stone.angle * Math.PI / 180)); stone.y = mPointY (float) (mRadius * Math.sin(stone.angle * Math.PI / 180)); } if (flag == 0) { for (int i = 0; i < MENUS; i ) { menus = mMenus[i]; switch (i) { case 0: menus.x = 300 * 1.8f; menus.y = 50; break; case 1: menus.x = 300 * 1.8f 100; menus.y = 50; break; case 2: menus.x = 300 * 1.8f 200; menus.y = 50; break; case 3: menus.x = 300 * 1.8f; menus.y = 150; break; case 4: menus.x = 300 * 1.8f 10 100; menus.y = 250; break; } } } }
下载说明:请别用迅雷下载,失败请重下,重下不扣分!