Search in sources :

Example 1 with MenuCircleShowingAnimation

use of com.marshalchen.common.uimodule.utils.MenuCircleShowingAnimation in project UltimateAndroid by cymcsg.

the class MenuCircleShowingAnimationActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.menu_circle_animation_main);
    FrameLayout frameLayout = (FrameLayout) findViewById(R.id.container);
    MenuCircleShowingAnimation promotedActionsLibrary = new MenuCircleShowingAnimation();
    promotedActionsLibrary.setup(getApplicationContext(), frameLayout);
    View.OnClickListener onClickListener = new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            Toast.makeText(getApplicationContext(), "Button clicked.", Toast.LENGTH_SHORT).show();
        }
    };
    promotedActionsLibrary.addItem(getResources().getDrawable(android.R.drawable.ic_menu_edit), onClickListener);
    promotedActionsLibrary.addItem(getResources().getDrawable(android.R.drawable.ic_menu_send), onClickListener);
    promotedActionsLibrary.addItem(getResources().getDrawable(android.R.drawable.ic_input_get), onClickListener);
    promotedActionsLibrary.addMainItem(getResources().getDrawable(R.drawable.ic_add));
}
Also used : FrameLayout(android.widget.FrameLayout) View(android.view.View) MenuCircleShowingAnimation(com.marshalchen.common.uimodule.utils.MenuCircleShowingAnimation)

Aggregations

View (android.view.View)1 FrameLayout (android.widget.FrameLayout)1 MenuCircleShowingAnimation (com.marshalchen.common.uimodule.utils.MenuCircleShowingAnimation)1