How to create Circle Menu Android Example

How to create Circle Menu Android Example - Hello friend inabnomaniiyaha, In the article that you read this time with the title How to create Circle Menu Android Example, we have prepared this article well for you to read and take information in it. hopefully the contents of the post Artikel Android,what we write you can understand. Alright, happy reading.

Judul : How to create Circle Menu Android Example
link : How to create Circle Menu Android Example

Baca juga


How to create Circle Menu Android Example

Circle Menu Android is a simple, elegant UI menu with a circular layout and material design animations. Android UI library.

How to create Circle Menu Android Example


Setup

Add this to your app build.gradle:

implementation 'com.github.imangazalievm:circlemenu:3.0.0'

Usage

Add to your layout xml-file:

<com.imangazaliev.circlemenu.CircleMenu

        android:id="@+id/circleMenu"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        app:buttonColors="@array/colors"

        app:buttonIcons="@array/icons" />

Handling menu items clicks:

val circleMenu = findViewById<CircleMenu>(R.id.circleMenu);

circleMenu.setOnItemClickListener { menuButton ->   }

You can use open(boolean animate) and close(boolean animate) methods, to open and close menu programmatically

circleMenu.open(true)

Set EventListener for handling open/close actions

circleMenu.setOnItemClickListener { buttonIndex -> }

circleMenu.onMenuOpenAnimationStart { }

circleMenu.onMenuOpenAnimationEnd { }

circleMenu.onMenuCloseAnimationStart { }

circleMenu.onMenuCloseAnimationEnd { }

circleMenu.onButtonClickAnimationStart { buttonIndex -> }

circleMenu.onButtonClickAnimationEnd { buttonIndex -> }

Options

CircleMenu XML-options:

  • buttonIcons (required) - icons of menu buttons
  • buttonColors (required) - background colors of menu buttons
  • iconsColor - color of buttons icons
  • startAngle - start circle angle
  • maxAngle - maximum degree of the menu arc
  • distance - the distance between center menu and buttons (radius)
  • centerButtonColor - background color of center menu button
  • centerButtonIconColor - icon background color of center menu button
  • menuIcon - center button icon type: hamburger or plus
  • openOnStart - open the menu when the screen starts
  • showSelectAnimation - show select animation when clicking on on a button or just close the menu



That's the articleHow to create Circle Menu Android Example

That's it for the article How to create Circle Menu Android Example this time, hopefully can be useful for all of you. well, see you in another article post.

You are now reading the articleHow to create Circle Menu Android Example with link addresshttps://inabnonapudyawanabing.blogspot.com/2020/08/how-to-create-circle-menu-android.html

Related Posts :

0 Response to "How to create Circle Menu Android Example"

Post a Comment

Tips Tricks for Android Phone

Tips & Tricks for Android Phone is a free android app and Collection of Tips and Tricks related to using your android mobile device lik...