hitomis / circlemenu Goto Github PK
View Code? Open in Web Editor NEWDelicate, chic and supports customizable circle menu
Delicate, chic and supports customizable circle menu
Hello,
When "setMainMenu(...)" is called after "onSizeChanged(...)", openMenuIcon is not showing sometimes.
So you have to call "resetMainDrawableBounds()" in "setMainMenu(...)".
This gonna be better to prevent openMenuIcon.draw(canvas) not working.
Have nice work!
Here is my fixes.
public CircleMenu2 setMainMenu(int mainMenuColor, int openMenuRes, int closeMenuRes) {
this.openMenuIcon = this.convertDrawable(openMenuRes);
this.closeMenuIcon = this.convertDrawable(closeMenuRes);
this.mainMenuColor = mainMenuColor;
**resetMainDrawableBounds();**
return this;
}
public CircleMenu2 setMainMenu(int mainMenuColor, Bitmap openMenuBitmap, Bitmap closeMenuBitmap) {
this.openMenuIcon = this.convertBitmap(openMenuBitmap);
this.closeMenuIcon = this.convertBitmap(closeMenuBitmap);
this.mainMenuColor = mainMenuColor;
**resetMainDrawableBounds();**
return this;
}
public CircleMenu2 setMainMenu(int mainMenuColor, Drawable openMenuDrawable, Drawable closeMenuDrawable) {
this.openMenuIcon = openMenuDrawable;
this.closeMenuIcon = closeMenuDrawable;
this.mainMenuColor = mainMenuColor;
**resetMainDrawableBounds();**
return this;
}
I don't have this in my library
hi,
my problem :
http://uupload.ir/files/u3oq_demo.gif.gif
my code is
`
circleMenu = (CircleMenu) findViewById(R.id.circle_menu);
circleMenu.setMainMenu(Color.parseColor("#FF4081"), R.mipmap.ic_more_vert_white, R.mipmap.eqiq_icon_cancel)
.addSubMenu(Color.parseColor("#FF6A00"), R.mipmap.ic_bookmark_border_white_24dp)
.addSubMenu(Color.parseColor("#8A39FF"), R.mipmap.ic_share)
.addSubMenu(Color.parseColor("#30A400"), R.mipmap.abc_ic_ab_back)
.addSubMenu(Color.parseColor("#FF4B32"), R.mipmap.dll)
.addSubMenu(Color.parseColor("#258CFF"), R.mipmap.ic_action_pause)
.setOnMenuSelectedListener(new OnMenuSelectedListener() {
@Override
public void onMenuSelected(int index) {
}
}).setOnMenuStatusChangeListener(new OnMenuStatusChangeListener() {
@Override
public void onMenuOpened() {}
@Override
public void onMenuClosed() {}
});
`
Hello, I want to menu be open as default. is that possible?
Thank for this great menu.
How to make icons larger?
Can i change circle size?
hello,
a new bug is in v 1.0.2 for up button:
http://uupload.ir/files/k6w4_np.gif
Hi @Hitomis , i use this library. i write this code but when click on back button, not close the menu! when press back button close activity!
@Override public void onBackPressed() { if (profile_circleMenu.isOpened()) { profile_circleMenu.closeMenu(); } super.onBackPressed(); }
how can close menu with backButton?
Thnx ❤️
Main activity where I am loading child fragments gets empty, till all the fragments are laoded. Please help.
Hi, Thanks for this great library.
I want remove padding, i set menu in this position :
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
but in this position show padding left and bottom! i want not padding in this menu, how can edit your CircleMenu.java for set padding=0 ?
Thanks ❤️
When i recycle the view with the button, the icon of the recycled view disappears. Im using the setMainMenu void inside the onBindViewHolder function. Any ideas on how can i fix this?
activity设置横屏显示,在点选菜单的时候,关闭动画开始的时候,会在4个角的任意一角出现半圆,请悉知!
猜测:关闭动画应该是画布移动0,0导致的
Hi,
How can i change size of items circle and icons?
Thanks,
Vafa
我现在的需求是双击屏幕上任意一点 弹出几个按钮 您能给点建议吗
i have this Issues
CircleMenu-master\cmlibrary\build.gradle
No service of type Factory available in projectScopeService
after open file
problem in
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.android.library'
// JitPack Maven
apply plugin: 'com.github.dcendents.android-maven'
// Group
group='com.github.Hitomi'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.1.1'
}
thank you and have nice day
当不设置主按键的图片资源时,它的引用为null,为何不创建一个默认的呢?
I want gone this menu and use this code circleMenu.setVisibility(View.INVISIBLE);
but not work!
How to give each menu option to add ID?
Still rendering problem exist checked with latest version as mentioned
Hi Hitomis, I want to add onClickListner on the sub-menus. I added the following code but it is not working.
Intent intent1 = new Intent(this,Activity2.class); this.startActivity(intent1); return true;
Please help me to add the onClickListner.
Not able to perform onMenuSelectedListener on Sub Menu in Android Kotlin...
How can add label text title to each menu
Thank you in advance
With this the circle does not turn fully, it turns half way and open the new activity. how would I solve the issue?
circleMenu.setOnMenuSelectedListener(new OnMenuSelectedListener() {
@Override
public void onMenuSelected(int index) {
switch (index) {
case 0:
Toast.makeText(Circle.this, "Home Button Clicked", Toast.LENGTH_SHORT).show();
break;
case 1:
startActivity(new Intent(Circle.this, track.class));
break;
hello, I want to ask, is it possible to add long press listener in the circular main menu
hello Hitomi,
i have 5 Buttons in my Activity, when i click on the any button, its menu should be opened as a circle
i tried to put the implementation of the circle menu inside the onclick of btn_car button but it did't work
` @OverRide
public void onClick(View v) {
switch (v.getId()){
case R.id.btn_car:
//Here the implementation of circle Menu of Car, when btn_car is clicked
break;`
Can you please help?
First of all thanks a lot for a great lib!
When adding only 2 subMenu buttons they are rendered vertically, however I think that they will be better rendered horizontally.
SetClickable SetEnable take no effect.
I would like to prevent multiple clicks when an async call is made, but SetClickable SetEnable take no effect. The menu is always enabled.
java.lang.NullPointerException
at com.hitomi.cmlibrary.CircleMenu.resetMainDrawableBounds(CircleMenu.java:660)
at com.hitomi.cmlibrary.CircleMenu.onSizeChanged(CircleMenu.java:174)
at android.view.View.sizeChange(View.java:17638)
at android.view.View.setFrame(View.java:17600)
at android.view.View.layout(View.java:17517)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)
at android.view.View.layout(View.java:17520)
at android.view.ViewGroup.layout(ViewGroup.java:5612)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:17520)
at android.view.ViewGroup.layout(ViewGroup.java:5612)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)
at android.view.View.layout(View.java:17520)
at android.view.ViewGroup.layout(ViewGroup.java:5612)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:345)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:548)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:533)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:533)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$70(RenderTask.java:659)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
This is the issue i am getting with the new version of the Hitomis library
can we use center as oval button and text.. or the center button invisible and other visible..
and also need add text below the icon.. is there any solution?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.