在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Ramotion/circle-menu-android开源软件地址(OpenSource Url):https://github.com/Ramotion/circle-menu-android开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):CIRCLE MENU [JAVA]A simple, elegant UI menu with a circular layout and material design animationsWe specialize in the designing and coding of custom UI for Mobile Apps and Websites.Stay tuned for the latest updates:Requirements
Installation Just download the package from here and add it to your project classpath, or just use the maven repo: Gradle: implementation 'com.ramotion.circlemenu:circle-menu:0.3.2' SBT: libraryDependencies += "com.ramotion.circlemenu" % "circle-menu" % "0.3.2" Maven: <dependency>
<groupId>com.ramotion.circlemenu</groupId>
<artifactId>circle-menu</artifactId>
<version>0.3.2</version>
</dependency> Basic usagePlace the app:button_colors="@array/colors"
app:button_icons="@array/icons" Example of arrays <?xml version="1.0" encoding="utf-8"?>
<resources>
<array name="icons">
<item>@drawable/ic_home_white_24dp</item>
<item>@drawable/ic_search_white_24dp</item>
<item>@drawable/ic_notifications_white_24dp</item>
<item>@drawable/ic_settings_white_24dp</item>
<item>@drawable/ic_place_white_24dp</item>
</array>
<array name="colors">
<item>@android:color/holo_blue_light</item>
<item>@android:color/holo_green_dark</item>
<item>@android:color/holo_red_light</item>
<item>@android:color/holo_purple</item>
<item>@android:color/holo_orange_light</item>
</array>
</resources> Or use the constructor CircleMenuView(@NonNull Context context, @NonNull List<Integer> icons, @NonNull List<Integer> colors) to add Next, connect the event handler final CircleMenuView menu = (CircleMenuView) findViewById(R.id.circle_menu);
menu.setEventListener(new CircleMenuView.EventListener() {
@Override
public void onMenuOpenAnimationStart(@NonNull CircleMenuView view) {
Log.d("D", "onMenuOpenAnimationStart");
}
@Override
public void onMenuOpenAnimationEnd(@NonNull CircleMenuView view) {
Log.d("D", "onMenuOpenAnimationEnd");
}
@Override
public void onMenuCloseAnimationStart(@NonNull CircleMenuView view) {
Log.d("D", "onMenuCloseAnimationStart");
}
@Override
public void onMenuCloseAnimationEnd(@NonNull CircleMenuView view) {
Log.d("D", "onMenuCloseAnimationEnd");
}
@Override
public void onButtonClickAnimationStart(@NonNull CircleMenuView view, int index) {
Log.d("D", "onButtonClickAnimationStart| index: " + index);
}
@Override
public void onButtonClickAnimationEnd(@NonNull CircleMenuView view, int index) {
Log.d("D", "onButtonClickAnimationEnd| index: " + index);
}
}); You can use Here are the attributes you can specify through XML or related setters:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论