ArcMenu

仿Path带动画效果的扇形菜单

ArcMenu_第1张图片

用法

ArcMenu menu = (ArcMenu) findViewById(R.id.arc_menu);
final int itemCount = ITEM_DRAWABLES.length;
for (int i = 0; i < itemCount; i++) {
    ImageView item = new ImageView(this);
    item.setImageResource(ITEM_DRAWABLES[i]);
    menu.addItem(item,new OnClick(View v){
        Toast.makeText(MainActivity.this, "position:" + position, Toast.LENGTH_SHORT).show();
    });
}

改变外观可以在xml中

custom:childSize="50px"
custom:fromDegrees="0.0"
custom:toDegrees="300.0"

或者在java中

arcLayout.setChildSize(50);
arcLayout.setArc(0.0f,300.0f);

ArcMenu

你可能感兴趣的:(ArcMenu)